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); }
private void CreateDirectoryParser() { directoryParser = new WindowsDirectoryParser(); }