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.
Apache 的 FileUtils 中的方法是否执行同步(阻塞)i/o?
我正在打电话给 FileUtils。复制目录到目录。在我的下一行,我想删除我复制的目录。
例子:
FileUtils.copyDirectoryToDirectory(source, destination); FileUtils.deleteDirectory(source);
只是想确保这是“安全的”并且不会发生异步(非阻塞)i/o。
谢谢。
两件事情:
所以回答你的问题,是的,你的整体操作是安全的。