Exemplo n.º 1
0
 public DirectoryAccessor(IDirectory baseDirectory, FileSystemAccessor parent, IFileSystem parentFs, string path)
 {
     Directory = baseDirectory;
     Parent    = parent;
     ParentFs  = parentFs;
     Path      = path;
 }
Exemplo n.º 2
0
        public Result Find(string name, out FileSystemAccessor fileSystem)
        {
            lock (_locker)
            {
                if (!Table.TryGetValue(name, out fileSystem))
                {
                    return(ResultFs.MountNameNotFound);
                }

                return(Result.Success);
            }
        }
Exemplo n.º 3
0
        public Result Mount(FileSystemAccessor fileSystem)
        {
            lock (_locker)
            {
                string mountName = fileSystem.Name;

                if (Table.ContainsKey(mountName))
                {
                    return(ResultFs.MountNameAlreadyExists);
                }

                Table.Add(mountName, fileSystem);

                return(Result.Success);
            }
        }
Exemplo n.º 4
0
 public FileAccessor(IFile baseFile, FileSystemAccessor parent, OpenMode mode)
 {
     File     = baseFile;
     Parent   = parent;
     OpenMode = mode;
 }
Exemplo n.º 5
0
 public DirectoryAccessor(IDirectory baseDirectory, FileSystemAccessor parent)
 {
     Directory = baseDirectory;
     Parent    = parent;
 }