public GDFStats ExamineSectors() { GDFStats stats = new GDFStats(this.volDesc); for (int i = 0; i < 0x20; i++) { stats.SetPixel((uint) i, (GDFStats.GDFSectorStatus) (-16711936)); } stats.SetPixel(this.volDesc.RootDirSector, (GDFStats.GDFSectorStatus) (-65536)); uint lastSector = 0; this.ParseDirectory(this.rootDir, true, ref lastSector); this.calcSectors(this.rootDir, stats); return stats; }
public GDFStats ExamineSectors() { GDFStats stats = new GDFStats(this.volDesc); for (int i = 0; i < 0x20; i++) { stats.SetPixel((uint)i, (GDFStats.GDFSectorStatus)(-16711936)); } stats.SetPixel(this.volDesc.RootDirSector, (GDFStats.GDFSectorStatus)(-65536)); uint lastSector = 0; this.ParseDirectory(this.rootDir, true, ref lastSector); this.calcSectors(this.rootDir, stats); return(stats); }
private void calcSectors(GDFDirTable table, GDFStats stats) { stats.UsedDirSectors += (uint)Math.Ceiling((double)(((double)table.Size) / ((double)stats.SectorSize))); stats.TotalDirs++; foreach (GDFDirEntry entry in table) { if (entry.IsDirectory) { if (entry.SubDir == null) { entry.SubDir = new GDFDirTable(this.fr, this.volDesc, entry.Sector, entry.Size); entry.SubDir.Parent = entry; } this.calcSectors(entry.SubDir, stats); } else { uint num = (uint)Math.Ceiling((double)(((double)entry.Size) / ((double)stats.SectorSize))); stats.TotalFiles++; stats.UsedDataSectors += num; stats.DataBytes += entry.Size; } } }
private void calcSectors(GDFDirTable table, GDFStats stats) { stats.UsedDirSectors += (uint) Math.Ceiling((double) (((double) table.Size) / ((double) stats.SectorSize))); stats.TotalDirs++; foreach (GDFDirEntry entry in table) { if (entry.IsDirectory) { if (entry.SubDir == null) { entry.SubDir = new GDFDirTable(this.fr, this.volDesc, entry.Sector, entry.Size); entry.SubDir.Parent = entry; } this.calcSectors(entry.SubDir, stats); } else { uint num = (uint) Math.Ceiling((double) (((double) entry.Size) / ((double) stats.SectorSize))); stats.TotalFiles++; stats.UsedDataSectors += num; stats.DataBytes += entry.Size; } } }