Changeset 1230
- Timestamp:
- 9/30/2009 5:03:22 AM (4 years ago)
- Location:
- trunk/eraser6/Eraser.DefaultPlugins
- Files:
-
- 2 edited
-
FileSystems/Fat.cs (modified) (4 diffs)
-
Plugin.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6/Eraser.DefaultPlugins/FileSystems/Fat.cs
r1221 r1230 71 71 } 72 72 73 protected override DateTime MinTimestamp74 {75 get76 {77 return new DateTime(1980, 1, 1, 0, 0, 0);78 }79 }80 }81 82 public class Fat32FileSystem : FatFileSystem83 {84 public override bool Supports(string fileSystemName)85 {86 if (fileSystemName == "FAT32")87 return true;88 return false;89 }90 91 73 public override void EraseDirectoryStructures(VolumeInfo info, 92 74 FileSystemEntriesEraseProgress callback) … … 95 77 { 96 78 int directoriesCleaned = 0; 97 Fat 32Api api = new Fat32Api(info, stream);79 FatApi api = GetFatApi(info, stream); 98 80 HashSet<uint> eraseQueueClusters = new HashSet<uint>(); 99 81 List<FatDirectoryEntry> eraseQueue = new List<FatDirectoryEntry>(); … … 111 93 callback(directoriesCleaned, directoriesCleaned + eraseQueue.Count); 112 94 113 FatDirectory currentDir = api.LoadDirectory(eraseQueue[0].FullName);95 FatDirectoryBase currentDir = api.LoadDirectory(eraseQueue[0].FullName); 114 96 eraseQueue.RemoveAt(0); 115 97 … … 132 114 } 133 115 } 116 117 protected override DateTime MinTimestamp 118 { 119 get 120 { 121 return new DateTime(1980, 1, 1, 0, 0, 0); 122 } 123 } 124 125 /// <summary> 126 /// Gets the FAT API to use to interface with the disk. 127 /// </summary> 128 protected abstract FatApi GetFatApi(VolumeInfo info, FileStream stream); 129 } 130 131 public class Fat16FileSystem : FatFileSystem 132 { 133 public override bool Supports(string fileSystemName) 134 { 135 if (fileSystemName == "FAT16") 136 return true; 137 return false; 138 } 139 140 protected override FatApi GetFatApi(VolumeInfo info, FileStream stream) 141 { 142 return new Fat16Api(info, stream); 143 } 144 } 145 146 public class Fat32FileSystem : FatFileSystem 147 { 148 public override bool Supports(string fileSystemName) 149 { 150 if (fileSystemName == "FAT32") 151 return true; 152 return false; 153 } 154 155 protected override FatApi GetFatApi(VolumeInfo info, FileStream stream) 156 { 157 return new Fat32Api(info, stream); 158 } 134 159 } 135 160 } -
trunk/eraser6/Eraser.DefaultPlugins/Plugin.cs
r1210 r1230 56 56 PrngManager.Register(new RngCrypto()); 57 57 58 FileSystemManager.Register(new Fat16FileSystem()); 58 59 FileSystemManager.Register(new Fat32FileSystem()); 59 60 FileSystemManager.Register(new NtfsFileSystem());
Note: See TracChangeset
for help on using the changeset viewer.
