Пример #1
0
        public SearchResult(Win32.UsnEntry usnEntry, UsnJournal journal)
        {
            UsnEntry = usnEntry;

            _journal = journal;
            _driveName = journal.RootDirectory.FullName;
        }
Пример #2
0
        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));
                }
            }
        }
Пример #3
0
        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));
                }
            }
        }