Java file delete on NFS drive
I am trying to delete a file on a NFS drive.
I have had other problems manipulating files on remote drives such as moving a file - however i got around it开发者_高级运维 by not using the conventional method i.e renameFile but instead properly using input and output streams.
However using the File.delete() returns false , and I have heard suggestions on using the apache commons io FileUtils class - however it just throws an IO exception.
Does anybody have any suggestions on a way to delete a file on a network mounted drive using java?
I fixed it.
I hadnt close a previous buffered reader - meaning the delete couldnt get a lock on the file!
精彩评论