We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
文件恢复工具都是从扫描磁盘中的文件头或文件树的旧痕迹开始的。
要从头开始执行此操作,您需要了解目标驱动器及其文件系统。可以说,没有 API,尽管有一些项目可以直接从 Linux 访问 NTFS 文件系统,尽管听起来像是在 Windows 中开发。它们列在我的帖子中 Wiki 链接的末尾。我有一些可以直接访问驱动器的链接。从那里,您可以尝试通过任何可以从 NTFS 日志、日志或 FS 的其他组件派生的方法来检测旧文件。
假设您想使用 Windows 7 并将在操作系统中运行您的程序,请查看以下链接:
您想要什么写作并不是一件微不足道的任务,但这正是它的有趣之处。
Well the file recovery tools all start by scanning the disk for file headers or for old traces of the file tree.
Looking to do this from scratch you need to understand your target drive and its file system. There is no API so to say, though there are projects that deal with accessing the NTFS file system directly from linux, though it sounds like you are developing in Windows. They are listed at the end of the Wiki link in my post. I have some links that will access the drive directly. From there you can t,ry to detect old files though any means you could derive from the NTFS Journal, Log or other component of the FS.
Assuming you want to use Windows 7 and will be running your program in the OS take a look these links:
What your looking to write is no trivial task, though that's what makes it interesting.
您的意思是文件已删除(移至垃圾箱)还是从硬盘中删除(标记为替换)?如果您正在寻找第二个选项,我确信 Windows 不会提供任何解决方案。
Do you mean files deleted (moved to trash) or removed from the hdd (marked for replacement)? If you're looking for the second option, I'm quite sure Windows do not offer any solution to that.
您必须手动分析磁盘上的数据,即通过读取原始磁盘内容并查找标记为已删除的文件。
一个好的开始是阅读您想要支持的文件系统的内部结构,因为您将需要它们。没有用于此目的的 API。
You will have to analyze the data on the disk manually, i.e. by reading the raw disk content and looking for files which are marked as deleted.
A good start would be reading into the internals of the filesystem(s) you want to support since you will need them. There is no API for that.