Java - atomically delete a (non-empty) directory

谁都会走 提交于 2021-02-08 14:04:39

问题


In a Java application, is there a way to atomically (with regards to other running processes) delete a non-empty directory?


回答1:


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.



来源:https://stackoverflow.com/questions/13890949/java-atomically-delete-a-non-empty-directory

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