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))); }
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))); }
public static IEnumerable <FileInfo> IterateFiles(this DirectoryInfo di, SearchOption so) { return(di.IterateFiles((fn, ff) => true, (dn, df) => so == SearchOption.AllDirectories && FSEnumerator.RecursionTest(dn, df))); }