public static FileDescriptor LoadFrom(MainStoragePath mainPath, string fullPath) { DateTime writeDate = File.GetLastWriteTimeUtc(fullPath); var info = new FileInfo(fullPath); long len = info.Length; return new FileDescriptor(mainPath.CreateRelative(fullPath), len, writeDate); }
public NetworkContext(NewFileModule module, NetworkModel model, MainStoragePath mainPath) { _fileModule = module; _mainPath = mainPath; _netModel = model; _mainFileIndex = new MainFileIndex(this); _changeWatcher = new ChangeWatcher(this); _dispatcher = new ChangeMaster(this); }
public static FileSystemObjectDescriptor New(MainStoragePath mainPath, string fullPath) { if (File.Exists(fullPath)) { return FileDescriptor.LoadFrom(mainPath, fullPath); } if (Directory.Exists(fullPath)) { return new FolderDescriptor(mainPath.CreateRelative(fullPath)); } throw new FileNotFoundException(fullPath); }
public NetworkModel(string path) { MainPath = new MainStoragePath((AbsPath) path); GroupList = new List<GroupModel>(); }
public FileTable(MainStoragePath folderPath) { this.folderPath = folderPath; table = new Dictionary<string, FileSystemObjectDescriptor>(); }
public FileTable(MainStoragePath mainPath) : base(mainPath) { _mainPath = mainPath; //_table = new Dictionary<RelPath, FsObject<RelPath>>(); //_rootDirectory = new DirNode((Name)Path.GetFileName(mainPath.ToString()), null); //_indexedDirectories = new Dictionary<RelPath, DirNode>(); }