Exemple #1
0
        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");
            }
        }
Exemple #2
0
        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");
            }
        }