public FAT32(Partition p) : base(p) { BootSector = new BootSectorFAT32(p); BootSector.Refresh(); if ((BootSector as BootSectorFAT32).BPB_FSInfo != 0x0) FileSystemInfo32 = new FileSystemInfo32(p, (BootSector as BootSectorFAT32).BPB_FSInfo); else FileSystemInfo32 = null; FileAllocationTable = new FileAllocationTableFAT32(this, p, BootSector.ReservedSectorCount, (uint)(BootSector.ReservedSectorCount + BootSector.FATsz16)); CalcOffsets(); }
public FileAllocationTableFAT32(FAT32 fat32, Partition p, uint firstsector, uint secondsector) { this.fat32 = fat32; this.FirstSector = firstsector; this.SecondSector = secondsector; this.TotalClusters = (fat32.BootSector.TotalSectors32-fat32.BootSector.ReservedSectorCount)/ fat32.BootSector.SectorsPerCluster; this.p = p; this.ClusterSize = (uint)(fat32.BootSector.SectorsPerCluster * fat32.BootSector.BytesPerSec); switch (fat32.BootSector.BytesPerSec/4) { case 128: Shift = 7; Mask = 0x7f; break; default: throw new Exception("weird sector size"); } }
protected FAT(Partition p) { this.p = p; }
public FileSystemInfo32(Partition p, uint Offset) { this.p = p; this.Offset = Offset; Sector = new byte[p.BlockSize]; }
public BootSectorFAT32(Partition p) : base(p) { }
public BootSector(Partition p) { this.p = p; Sector = new byte[p.BlockSize]; }