Exception while deleting directory using FileUtils.deleteDirectory

2

The directory has 6 files inside it. The exception that occurs is java.io.IOException: Unable to delete file: tmp \ umDosArquivos. Manually, I can delete all files and directory. I used the canWrite method of File to see if there was any lock, but it always returns true. File access permissions are also correct. What could be happening?

File tmpDir = new File("tmp");
if (tmpDir.exists()) {
    FileUtils.deleteDirectory(tmpDir);
}
    
asked by anonymous 19.03.2015 / 12:39

0 answers