用Java删除锁定的文件? [英] Deleting locked files with Java?
本文介绍了用Java删除锁定的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我担心遇到目录文件被锁定。 b
$ b
我们可以调用 Unlocker 进行删除。还是有更多的以Java为中心的方式来处理这种情况呢?解析方案
Java对文件系统的访问非常简单。如果不使用某些本地库,则不能这样做。
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?
解决方案
Java has a very simplistic access to the file system. You can't do this without using some native libraries.
这篇关于用Java删除锁定的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文