コード例 #1
0
 private IEnumerable <Pair <FileInfo> > EnumerateCommonFilesLeftAndRight(DirectoryInfo leftFiles, DirectoryInfo rightFiles)
 {
     return(leftFiles.EnumerateFiles().Where(f => !ExcludedFileExtensions.Contains(f.Extension)).Where(f => rightFiles.HasFile(f)).Select(left => new Pair <FileInfo>(left, rightFiles.GetCorrespondingFile(left))));
 }
コード例 #2
0
 public static bool ShouldExcludeExtension(string extension)
 {
     extension = extension.ToLowerInvariant();
     return(ExcludedFileExtensions.Contains(extension));
 }
コード例 #3
0
 private IEnumerable <FileInfo> EnumerateLeftFilesMissingRight(DirectoryInfo leftFiles, DirectoryInfo rightFiles)
 {
     return(leftFiles.EnumerateFiles().Where(f => !ExcludedFileExtensions.Contains(f.Extension)).Where(f => !rightFiles.HasFile(f)));
 }