Deleting locked files with Java?

前提是你 提交于 2019-12-23 10:26:07

问题


We have to delete some directories and their contents using Java running on Windows.

I was worried about running into the directory files being locked.

We could just invoke Unlocker to do the delete. Or is there a more Java centric way to handle this situation?


回答1:


Java has a very simplistic access to the file system. You can't do this without using some native libraries.



来源:https://stackoverflow.com/questions/2885406/deleting-locked-files-with-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!