private AddParent ( |
||
inodeIndex | ||
리턴 | System.Boolean |
/// <summary> /// 添加一个目录目录项 /// </summary> /// <param name="name"></param> /// <param name="dir"></param> /// <returns></returns> public Boolean Add(String name, INodeDirectory dir) { if (Contains(name)) { return(false); } if (dir.Contains("..")) { return(false); } entries[name] = dir.inode.index; dir.inode.data.linkCount++; dir.inode.Save(); dir.AddParent(inode.index); Save(); return(true); }
/// <summary> /// 添加一个目录目录项 /// </summary> /// <param name="name"></param> /// <param name="dir"></param> /// <returns></returns> public Boolean Add(String name, INodeDirectory dir) { if (Contains(name)) { return false; } if (dir.Contains("..")) { return false; } entries[name] = dir.inode.index; dir.inode.data.linkCount++; dir.inode.Save(); dir.AddParent(inode.index); Save(); return true; }