예제 #1
0
        public VfsNode(string name, DateTime timestamp, VfsDirectoryNode parent)
        {
            Name      = name;
            Timestamp = timestamp;
            Parent    = parent;

            if (parent != null)
            {
                lock (parent)
                {
                    Parent.IncrementVersion();

                    NextSibling = parent.FirstChild;
                    if (parent.FirstChild != null)
                    {
                        parent.FirstChild.PreviousSibling = this;
                    }

                    Parent.FirstChild = this;
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Attempts to get the VFS node (directory or file) at the given VFS root relative path
 /// </summary>
 public bool TryGetNode(string relativePath, out VfsNode node)
 {
     return(_nodeMap.TryGetValue(relativePath, out node));
 }