protected VfsEntry(string name, VfsDevice device, VfsEntry parent = null) { _device = device; _parent = parent; _children = new Dictionary <string, VfsEntry>(); _name = name; if (parent != null) { _path = Path.Combine(parent._path, _name); parent.AddChild(this); } else { _path = _name; } }
protected VfsFile(string name, VfsDevice device, VfsEntry parent = null) : base(name, device, parent) { }
internal void AddChild(VfsEntry childEntry) => _children.TryAdd(childEntry.Name, childEntry);
public bool TryGetChild(string name, out VfsEntry child) => _children.TryGetValue(name, out child);