public FAT(FileSystemController fsctrl, int tableSize, Stream input) { this.fsctrl = fsctrl; this.tableSize = tableSize; table = new ushort[this.tableSize]; fromByteStream(input); }
public FAT(FileSystemController fsctrl, int tableSize) { this.fsctrl = fsctrl; this.tableSize = tableSize; table = new ushort[this.tableSize]; uint systemArea = fsctrl.SuperBlock.RootOffset / fsctrl.SuperBlock.ClusterSize; uint i; for (i = 0; i < systemArea; ++i) { table[i] = CL_SYSTEM; } uint rootdirArea = (fsctrl.SuperBlock.DataOffset - fsctrl.SuperBlock.RootOffset) / fsctrl.SuperBlock.ClusterSize; for (i = systemArea; i < systemArea + rootdirArea; ++i) { table[i] = (ushort)(i + 1); } table[i - 1] = CL_EOF; }