コード例 #1
0
 /// <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();
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 /// <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;
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 /// <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)
 {
 }
コード例 #7
0
 /// <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;
 }