Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Java 应用程序中,有没有办法以原子方式(关于其他正在运行的进程)删除非空目录?
操作系统(Windows、Unix)不支持此操作,但您可以做的是重命名目录,甚至将其移开,然后再将其删除。