Пример #1
0
 public static IEnumerable <FileInfo> IterateFiles(this DirectoryInfo di, FSEnumerator.EntryTestRoutine fileTest,
                                                   FSEnumerator.EntryTestRoutine recurseTest)
 {
     return
         (FSEnumerator.FindFiles(di.FullName, fileTest, recurseTest)
          .Select(iterate => new FileInfo(iterate.FullFileName)));
 }
Пример #2
0
 public static IEnumerable <FileInfo> IterateFiles(this DirectoryInfo di, FSEnumerator.EntryTestRoutine fileTest,
                                                   SearchOption so)
 {
     return(di.IterateFiles(fileTest,
                            (dn, df) => so == SearchOption.AllDirectories && FSEnumerator.RecursionTest(dn, df)));
 }