public SearchResult(Win32.UsnEntry usnEntry, UsnJournal journal) { UsnEntry = usnEntry; _journal = journal; _driveName = journal.RootDirectory.FullName; }
private void ScanFiles(UsnJournal journal) { List<Win32.UsnEntry> files; journal.GetFilesMatchingFilter("*", out files); if (_parallel) { files.AsParallel() .ForAll(entry => SearchResults.Add(new SearchResult(entry, journal))); } else { foreach (var file in files) { SearchResults.Add(new SearchResult(file, journal)); } } }
private void ScanDirectories(UsnJournal journal) { List<Win32.UsnEntry> folders; journal.GetNtfsVolumeFolders(out folders); if (_parallel) { folders.AsParallel() .ForAll(entry => SearchResults.Add(new SearchResult(entry, journal))); } else { foreach (var folder in folders) { SearchResults.Add(new SearchResult(folder, journal)); } } }