Showing Deleted Files?

May 12, 2010 at 4:41 PM

Does your API offer an easy way to show deleted files in a .dd or .img file?

I'm trying to index through files on a .dd or .img file and show all files, both overt and deleted.

Some code I already have:

static void Main(string[] args)
            {
                FileStream fs = File.Open(args[0], FileMode.Open);
                Raw.Disk disk = new Raw.Disk(fs, Ownership.None);

                VolumeManager vm = new VolumeManager();
                vm.AddDisk(fs);
                foreach (LogicalVolumeInfo lvi in vm.GetLogicalVolumes())
                {
                    if (lvi.Status == LogicalVolumeStatus.Healthy)
                    {
                        SparseStream ss = lvi.Open();
                        Fat.FatFileSystem fat = new Fat.FatFileSystem(ss);

                        Console.WriteLine("Files:");
                        foreach (string s in fat.GetDirectories(fat.Root.FullName))
                        {
                            Console.WriteLine(s);
                            foreach (string t in fat.GetFileSystemEntries(s))
                            {
                                Console.WriteLine(t);
                            }

                        }
                        foreach (string s in fat.GetFiles(fat.Root.FullName))
                        {
                            Console.WriteLine(s);
                        }
                    }
                }
                Console.ReadLine();
            }

 

 

Thanks,

TPM

 

Coordinator
May 29, 2010 at 7:44 AM

Hi,

There's no support in DiscUtils for trying to find / recover deleted files.

Cheers,

Ken