Java-原子删除(非空)目录 [英] Java - atomically delete a (non-empty) directory
本文介绍了Java-原子删除(非空)目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Java应用程序中,是否有一种原子方式(对于其他正在运行的进程)删除非空目录?
In a Java application, is there a way to atomically (with regards to other running processes) delete a non-empty directory?
推荐答案
操作系统(Windows,Unix)不支持此操作,但是您可以做的是重命名目录,甚至将其移开,然后稍后将其删除
The OS (Windows, Unix) doesn't support this operation, but what you can do is rename the directory or even move it away and then delete it later.
这篇关于Java-原子删除(非空)目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文