我怎么可以取消使用C#文件? [英] How can I undelete a file using C#?

查看:98
本文介绍了我怎么可以取消使用C#文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一些迷失的.jpg图片。这里有一个.bat文件设置我的情况

I'm trying to find some lost .jpg pictures. Here's a .bat file to setup a simplified version of my situation

md TestSetup
cd TestSetup
md a
cd a
echo "Can we find this later?" > a.abc
del a.abc
cd..
rd a

什么代码将需要再次打开文本文件?实际上,我在寻找类似的方式进行处理的.JPEG文件

What code would be needed to open the text file again? I'm actually looking for .jpeg files that were treated in a similar manner

更​​多细节:我试图从以前的一键备份恢复那里的图片文件目录和文件已被删除,一切都用单个字符的名称保存在备份,每个文件具有相同的3个字母的扩展。有一个最新的备份,但他们需要查看以前删除的(或至少是.jpg文件)

More details: I'm trying to recover picture files from a previous one-touch backup where the directories and files have been deleted and everything was saved in the backup with a single character name and every file has the same 3 letter extension. There is a current backup but they need to view the previous deleted ones (or at least the .jpg files).

下面就是我试图接近它:<一HREF =htt​​p://stackoverflow.com/questions/1344094/how-do-i-open-a-directory-wi​​th-createfile-in-c-to-examine-deleted-entries> C#代码

Here's how I was trying to approach it: C# code

推荐答案

据我所知,大多数文件恢复工具实际读取磁盘上的低级别的文件系统格式,并尝试拼凑删除的文件。这样做是因为,至少在FAT,删除的文件仍驻留在扇区指定目录(只是用不同的第一个字符,以确定其为已删除)。新文件可能会覆盖这些已删除的条目,从而使文件无法恢复。这是理论的,只是一点点。

To the best of my knowledge, most file recovery tools actually read the low-level filesystem format on the disk and try to piece together deleted files. This works because, at least in FAT, a deleted file still resides in the sector specifying the directory (just with a different first character to identify it as "deleted"). New files may overwrite these deleted entries and therefore make the file unrecoverable. That's just a little bit of theory.

有一个当前备份,但他们
需要查看以前删除的
(或至少.jpg文件)。

There is a current backup but they need to view the previous deleted ones (or at least the .jpg files).

除非有该文件的在时间<备份/ EM>要恢复从,我相信你将有一个很难获得的文件,而无需诉诸读一个低级别的文件系统。即使如此,你可能是出于运气如果有足够的修订已作出(或者它不是一个简单的文件系统像FAT)。

Unless there's a backup for that file at the time that you want to restore from, I believe you're going to have a hard time getting that file without resorting to a low-level filesystem read. And even then, you may be out of luck if enough revisions have been made (or it's not a trivial filesystem like FAT).

这篇关于我怎么可以取消使用C#文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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