/// <summary> /// 构造函数 /// </summary> /// <param name="tsb">传入的超级块</param> /// <param name="diskFile">磁盘文件</param> public DataBlock(Superblock tsb, Disk diskFile) { _initSuper = tsb; _diskFile = diskFile; _dataBlkNum = MachinePara.GetDataSize(); _dataBlkStart = MachinePara.GetDataStartAddr(); }
/// <summary> /// 构造函数 /// </summary> /// <param name="tsb"></param> /// <param name="tid"></param> /// <param name="tdb"></param> /// <param name="diskFile"></param> public Directary(Superblock tsb, InodeBlock tid, DataBlock tdb, Disk diskFile) { _superBlock = tsb; _inode = tid; _dataBlock = tdb; _diskFile = diskFile; }
public Run() { _disk = new Disk(); _boot = new Boot(_disk); _kernel = new Kernel(_disk); _superBlock = new Superblock(_disk); _inodeBlock = new InodeBlock(_superBlock, _disk); _dataBlock = new DataBlock(_superBlock, _disk); }
/// <summary> /// 构造函数 /// </summary> /// <param name="tsb"></param> /// <param name="tid"></param> /// <param name="tdb"></param> /// <param name="diskInfo"></param> /// <param name="createFilePath"></param> public File(Superblock tsb, InodeBlock tid, DataBlock tdb, Disk diskInfo, string createFilePath) { _superBlock = tsb; _inodeblock = tid; _dataBlock = tdb; _diskFile = diskInfo; _dire = new Directary(tsb, tid, tdb, diskInfo); _fileInode = new InodeStr(); _dirInode = new InodeStr(); _createFilePath = createFilePath; }
/// <summary> /// 构造函数 /// </summary> /// <param name="tsb"></param> /// <param name="tid"></param> /// <param name="tdb"></param> /// <param name="disk"></param> /// <param name="createFilePath"></param> /// <param name="originFilePath"></param> public CommonFile(Superblock tsb, InodeBlock tid, DataBlock tdb, Disk disk, string createFilePath, string originFilePath) : base(tsb, tid, tdb, disk, createFilePath) { _origFile = new RWFiles(originFilePath); }
/// <summary> /// 构造函数 /// </summary> /// <param name="tsb"></param> /// <param name="tid"></param> /// <param name="tdb"></param> /// <param name="disk"></param> /// <param name="createDirPath"></param> public DirFile(Superblock tsb, InodeBlock tid, DataBlock tdb, Disk disk, string createDirPath) : base(tsb, tid, tdb, disk, createDirPath) { }
/// <summary> /// 构造函数 /// </summary> /// <param name="tsb"></param> /// <param name="tid"></param> /// <param name="tdb"></param> /// <param name="disk"></param> /// <param name="createFilePath"></param> /// <param name="devType"></param> public DevFile(Superblock tsb, InodeBlock tid, DataBlock tdb, Disk disk, string createFilePath, string devType) : base(tsb, tid, tdb, disk, createFilePath) { this._devType = devType; }