英文:
Where do files deleted via apache.commons.io.FileUtils deleteDirectory go?
问题
我猜这可能不是那么重要,但我不知道文件是如何被删除的。它们只是突然消失了。它们不在回收站中。
我查看了Apache Common IO的文档,除了文件已被删除之外,找不到有关文件/目录如何被删除的任何信息。任何帮助都将不胜感激!
英文:
I suppose its not that important, however I have no idea how the files get deleted. They simply cease to exist. They're not in the recycle bin.
I looked in Apache Common IO's documentation and couldn't find anything about how the file/directory is deleted other than that the file is deleted. Any help would be appreciated!
答案1
得分: 2
The FileUtils.delete()
and FileUtils.deleteDirectory()
methods call into the java.io.FileSystem
class, which is backed by native code. This essentially means that the delete()
method delegates the actual deletion to the underlying OS and, consequently, to the file system on your drive.
Recycle bin is usually a GUI feature, it has nothing to do with the file system. On the file system level, there's no such thing as a "recycle bin" - the files are usually deleted with very limited ability to recover them. You can of course use some utilities to try and recover such file, however, this heavily depends on the file system you use.
英文:
The FileUtils.delete()
and FileUtils.deleteDirectory()
methods call into the java.io.FileSystem
class, which is backed by native code. This essentially means that the delete()
method delegates the actual deletion to the underlying OS and, consequently, to the file system on your drive.
Recycle bin is usually a GUI feature, it has nothing to do with the file system. On the file system level, there's no such thing as a "recycle bin" - the files are usually deleted with very limited ability to recover them. You can of course use some utilities to try and recover such file, however, this heavily depends on the file system you use.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论