Beispiel #1
0
        public Result Find(string name, out FileSystemAccessor fileSystem)
        {
            lock (_locker)
            {
                if (!Table.TryGetValue(name, out fileSystem))
                {
                    return(ResultFs.MountNameNotFound);
                }

                return(Result.Success);
            }
        }
Beispiel #2
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);
            }
        }
Beispiel #3
0
 public DirectoryAccessor(IDirectory baseDirectory, FileSystemAccessor parent)
 {
     Directory = baseDirectory;
     Parent    = parent;
 }
Beispiel #4
0
 public FileAccessor(IFile baseFile, FileSystemAccessor parent, OpenMode mode)
 {
     File     = baseFile;
     Parent   = parent;
     OpenMode = mode;
 }