示例#1
0
        public void LoadInode(Inode inode)
        {
            var offset = Offset + (inode.AgBlock * Context.SuperBlock.Blocksize) + (inode.BlockOffset * Context.SuperBlock.InodeSize);

            Context.RawStream.Position = offset;
            var data = Utilities.ReadFully(Context.RawStream, (int)Context.SuperBlock.InodeSize);

            inode.ReadFrom(data, 0);
        }
示例#2
0
        public Inode GetInode(ulong number)
        {
            var             inode = new Inode(number, this);
            AllocationGroup group = AllocationGroups[inode.AllocationGroup];

            group.LoadInode(inode);
            if (inode.Magic != Inode.InodeMagic)
            {
                throw new IOException("invalid inode magic");
            }
            return(inode);
        }
示例#3
0
 public File(Context context, Inode inode)
 {
     Context = context;
     Inode   = inode;
 }
示例#4
0
 public Symlink(Context context, Inode inode)
     : base(context, inode)
 {
 }
示例#5
0
 public Directory(Context context, Inode inode)
     : base(context, inode)
 {
 }