开发者

Java file delete on NFS drive

开发者 https://www.devze.com 2022-12-31 21:31 出处:网络
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

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!

0

精彩评论

暂无评论...
验证码 换一张
取 消