Esempio n. 1
0
        private static List <DuplicateFile> GetDuplicateFiles(string rootDirectory)
        {
            var directoryParser     = new WindowsDirectoryParser();
            var duplicateFileFinder = new DuplicateFileFinder(directoryParser);

            var windowsFileSizer = new WindowsFileSizer();
            var fileSizeDuplicatePatternMatcher = new FileSizeDuplicatePatternMatcher(windowsFileSizer);

            var fileHasher = new WindowsFileHasher();
            var fileHashDuplicatePatternMatcher = new FileHashDuplicatePatternMatcher(fileHasher);

            var fileNameDuplicatePatternMatcher = new FileNameDuplicatePatternMatcher();

            var duplicateFiles = duplicateFileFinder.GetDuplicates(rootDirectory, fileHashDuplicatePatternMatcher);

            return(duplicateFiles);
        }
Esempio n. 2
0
 private void CreateDirectoryParser()
 {
     directoryParser = new WindowsDirectoryParser();
 }