예제 #1
0
        public static void Run(string baseName, string scanRootDir, int numThreads)
        {
            ReportFiles.Open(baseName, scanRootDir);

            fst = new ConcurrentFilesystemTraverser(scanRootDir);

            progress = new ReportProgress(numThreads);
            progress.Start();

            int nThreads = numThreads;

            Parallel.For(0, nThreads, i => { FileProcessor(i); });

            progress.Stop();
            progress.DisplayFinalSummary();

            // ReportFiles.Close(); // Files closed under lock by progress.DisplayFinalSummary()
        }
예제 #2
0
        public static void ScanAndCopyUniques(string baseName, string scanRootDir, int numThreads, FileDB fileDB)
        {
            ReportFiles.Open(baseName, scanRootDir);

            CopyUniqueFile.SetSourcePathRoot(scanRootDir);

            fst = new ConcurrentFilesystemTraverser(scanRootDir);

            db         = fileDB;
            volumeName = baseName;

            progress = new ReportProgress(numThreads);
            progress.Start();

            int nThreads = numThreads;

            Parallel.For(0, nThreads, i => { FileProcessor(i); });

            progress.Stop();
            progress.DisplayFinalSummary();

            // ReportFiles.Close(); // Files closed under lock by progress.DisplayFinalSummary()
        }