As Waza_Be already states, all you need is file.delete(). So just delete your deleteFile method and instead of invoking it (in the onClick method of the positive dialog button), simply call file.delete() and you're done:
public void onClick(DialogInterface dialog, int button) {
// deleteFile(); <-- not needed
file.delete(); // <-- do this instead
}