public static void SetArrayInodeDirTable(int index, byte value) { arrayInodeDirTable[index] = value; HardDisk.Write(new byte[1] { value }, SuperBlock.InodeDirTableStart + index); }
public static void SetArrayBlock(int index, byte value) { arrayBlock[index] = value; HardDisk.Write(new byte[1] { value }, SuperBlock.FSMStart + index); }
public static void SetInodeID(string name, int ID) { byte[] buffer = System.Text.Encoding.ASCII.GetBytes(name); HardDisk.Write(buffer, SuperBlock.InodeNameAndIDTableStart + ID * SuperBlock.InodeNameLength); nameInode[ID] = name; }
public void SetArrayFile(int index, int number) { byte[] buffer = new byte[4]; buffer = BitConverter.GetBytes(SuperBlock.InodeStart + SuperBlock.InodeSize * number); HardDisk.Write(buffer, SuperBlock.InodeDirStart + dirID * SuperBlock.InodeDirSize + 4 * index); arrayFile[index] = SuperBlock.InodeStart + SuperBlock.InodeSize * number; }
public void SetArrayBlock(int index, int number) { byte[] buffer = new byte[4]; buffer = BitConverter.GetBytes(number * SuperBlock.BlockSize + SuperBlock.BlockStart); HardDisk.Write(buffer, SuperBlock.InodeStart + fileID * SuperBlock.InodeSize + 4 * index); arrayBlocks[index] = number * SuperBlock.BlockSize + SuperBlock.BlockStart; }