AllocateINode() public méthode

分配、初始化一个新的 inode
public AllocateINode ( UInt32 flags, UInt32 owner ) : INode
flags System.UInt32
owner System.UInt32
Résultat INode
Exemple #1
0
 /// <summary>
 /// 创建一个新目录
 /// </summary>
 /// <param name="vfs"></param>
 /// <returns></returns>
 public static INodeDirectory Create(VFSCore vfs)
 {
     INode inode = vfs.AllocateINode(1, 2333);
     INodeDirectory t = new INodeDirectory(vfs, inode);
     t.AddSelf();
     return t;
 }
Exemple #2
0
        /// <summary>
        /// 创建一个新目录
        /// </summary>
        /// <param name="vfs"></param>
        /// <returns></returns>
        public static INodeDirectory Create(VFSCore vfs)
        {
            INode          inode = vfs.AllocateINode(1, 2333);
            INodeDirectory t     = new INodeDirectory(vfs, inode);

            t.AddSelf();
            return(t);
        }
Exemple #3
0
            /// <summary>
            /// 创建一个文件夹
            /// </summary>
            /// <param name="name"></param>
            public void CreateDirectory(String name)
            {
                VFS.AssertNameValid(name);

                INode inode = vfs.AllocateINode(1, 2333);

                if (!dir.Add(name, new INodeDirectory(vfs, inode)))
                {
                    throw new Exception("创建文件夹失败");
                }
            }
Exemple #4
0
 /// <summary>
 /// 通过创建一个新文件来初始化该类
 /// </summary>
 /// <param name="vfs"></param>
 /// <param name="name"></param>
 /// <param name="dir"></param>
 private void CreateFile(INodeDirectory dir, String name)
 {
     inode = vfs.AllocateINode(0, 2333);
     dir.Add(name, inode);
 }