Esempio n. 1
0
        public FileEntry(DataDisk disk, ulong size, ulong mtime, uint mtimeNsec, ulong inode, string filename, uint blockSize)
        {
            this.Disk   = disk;
            this.Length = size;

            DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);

            dtDateTime = dtDateTime.AddSeconds(mtime);
            if (mtimeNsec != UInt32.MaxValue)
            {
                mtimeNsec /= 1000000;
                dtDateTime = dtDateTime.AddMilliseconds(mtimeNsec);
            }

            this.DateModified = dtDateTime;
            this.FileName     = filename;
            this.NumBlocks    = (size + blockSize - 1) / blockSize;
            this.Blocks       = new Block[this.NumBlocks];
        }
Esempio n. 2
0
 public DirectoryEntry(DataDisk disk, string name)
 {
     this.Disk = disk;
     this.Name = name;
 }