I'm having problems trying to delete 2 files, since when I try to delete the 2nd the first one isn't yet deleted and so the other delete will fail. I'm using:
Newfile.delete(); //Delete the temporary file
boolean jj = tmpfile.delete();
jj returns false everytime, so I need to wait for the NewFile be actually deleted b4 deleting the other one. I was thinking on something like:
Newfile.delete(); //Delete the temporary file
while (Newfile.exists()) { }
boolean jj = tmpfile.delete();
Any idea on how should I guarantee that the 2nd delete will only be ran after the 1st one was actually done?
Newfile.delete(); //Delete the temporary file
boolean jj = tmpfile.delete();
jj returns false everytime, so I need to wait for the NewFile be actually deleted b4 deleting the other one. I was thinking on something like:
Newfile.delete(); //Delete the temporary file
while (Newfile.exists()) { }
boolean jj = tmpfile.delete();
Any idea on how should I guarantee that the 2nd delete will only be ran after the 1st one was actually done?