need to check permission of file/directory i used
 //filePath = path of file/directory access denied by user ( in windows )
 File file = new File(filePath);
 file.canWrite(); 
 file.canRead();
 file.canExecute();
all of three returns true but m not able to delete any file/directory
You have to check:
SecurityManager.checkDelete(filepath);
As said in the JavaDoc
Have you tried using the java.nio.file.Files#isWritable method?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With