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; } } }
/// <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)); }