public void UpdateDirectoryInfo(DirEntry.UpdateHandle dir) { foreach (var device in os.Devices) { var name = device.name; var file = new MyFileEntry(name, mountPoint, true); file.guid = device.guid; dir.Files.Add(file); } }
public void UpdateDirectoryInfo(DirEntry.UpdateHandle handle) { if (handle.DirEntry.FullName == mountPoint.FullName) { foreach (var device in os.Devices) { var name = device.name; var dir = new MyDirEntry(name, mountPoint, true); dir.guid = device.guid; handle.Directories.Add(dir); } } else { } }
public void UpdateDirectoryInfo(DirEntry.UpdateHandle dir) { var path = mountPoint.GetRelativePathTo(dir.DirEntry); ulong id = 0; GetEntry(path, ref id); var filtered = entries.Where(e => e.Value.parentId == id).ToArray(); var files = filtered.Where(e => fileContents.ContainsKey(e.Key)).ToArray(); var dirs = filtered.Except(files).ToArray(); foreach (var d in dirs) { dir.AddDirectory(d.Value.name); } foreach (var f in files) { dir.AddFile(f.Value.name); } }