Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 protected VfsFile(string name, VfsDevice device, VfsEntry parent = null)
     : base(name, device, parent)
 {
 }
Exemplo n.º 3
0
 internal void AddChild(VfsEntry childEntry)
 => _children.TryAdd(childEntry.Name, childEntry);
Exemplo n.º 4
0
 public bool TryGetChild(string name, out VfsEntry child)
 => _children.TryGetValue(name, out child);