使用Java的File.delete()方法 [英] Using Java's File.delete() method

查看:1721
本文介绍了使用Java的File.delete()方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 File.delete()方法删除文件时,删除的文件在哪里?我使用的是Mac,我在垃圾箱中看不到该文件。我想知道文件存储在哪里?或者如果它永久消失。

When I used the File.delete() method to delete a file, where is the deleted file? I am using a Mac and I don't see the file in the Trash. I want to know where the file is being stored at? Or if it is permanently gone.

谢谢,

推荐答案

这是不见了。当您通过操作系统删除文件时,垃圾箱只是放置文件的临时位置。

It's gone. The trash bin is just a temporary place where files are put before being deleted, when you "delete" them through the OS.

但是,在大多数文件系统中,删除文件只从系统的文件列表中删除指向它的指针。实际数据可能会在硬盘上停留很长时间,直到被覆盖为止。有一些文件恢复工具可以尝试检索这些文件,但它们不是100%sucesfull。

In most filesystems, however, deleting a file only removes the pointer to it from the system's list of files. The actual data may sit on the harddrive for a significant amount of time until it is overwritten. There are file recovery tools available that can attempt to retrieve such files, but they are not 100% sucesfull.

这篇关于使用Java的File.delete()方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆