[英]Deleting locked files with Java?
We have to delete some directories and their contents using Java running on Windows. 我们必须使用在Windows上运行的Java删除一些目录及其内容。
I was worried about running into the directory files being locked. 我担心会遇到被锁定的目录文件。
We could just invoke Unlocker to do the delete. 我们可以调用Unlocker来执行删除操作。 Or is there a more Java centric way to handle this situation? 或者是否有更多以Java为中心的方法来处理这种情况?
Java has a very simplistic access to the file system. Java对文件系统的访问非常简单。 You can't do this without using some native libraries. 如果不使用某些本机库,则无法执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.