131 references to SearchOption
mscorlib (127)
system\io\directory.cs (64)
601return InternalGetFiles(path, "*", SearchOption.TopDirectoryOnly); 617return InternalGetFiles(path, searchPattern, SearchOption.TopDirectoryOnly); 624public static String[] GetFiles(String path, String searchPattern, SearchOption searchOption) 630if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 642private static String[] InternalGetFiles(String path, String searchPattern, SearchOption searchOption) 646Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 654internal static String[] UnsafeGetFiles(String path, String searchPattern, SearchOption searchOption) 658Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 673return InternalGetDirectories(path, "*", SearchOption.TopDirectoryOnly); 689return InternalGetDirectories(path, searchPattern, SearchOption.TopDirectoryOnly); 696public static String[] GetDirectories(String path, String searchPattern, SearchOption searchOption) 702if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 714private static String[] InternalGetDirectories(String path, String searchPattern, SearchOption searchOption) 718Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 727internal static String[] UnsafeGetDirectories(String path, String searchPattern, SearchOption searchOption) 731Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 747return InternalGetFileSystemEntries(path, "*", SearchOption.TopDirectoryOnly); 763return InternalGetFileSystemEntries(path, searchPattern, SearchOption.TopDirectoryOnly); 770public static String[] GetFileSystemEntries(String path, String searchPattern, SearchOption searchOption) 776if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 786private static String[] InternalGetFileSystemEntries(String path, String searchPattern, SearchOption searchOption) 790Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 800public SearchData(String fullPath, String userPath, SearchOption searchOption) 804Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 813public readonly SearchOption searchOption; 824internal static String[] InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, bool includeFiles, bool includeDirs, SearchOption searchOption, bool checkHost) 829Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 846return InternalEnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly); 859return InternalEnumerateDirectories(path, searchPattern, SearchOption.TopDirectoryOnly); 864public static IEnumerable<String> EnumerateDirectories(String path, String searchPattern, SearchOption searchOption) 870if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 879private static IEnumerable<String> InternalEnumerateDirectories(String path, String searchPattern, SearchOption searchOption) 883Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 897return InternalEnumerateFiles(path, "*", SearchOption.TopDirectoryOnly); 911return InternalEnumerateFiles(path, searchPattern, SearchOption.TopDirectoryOnly); 916public static IEnumerable<String> EnumerateFiles(String path, String searchPattern, SearchOption searchOption) 922if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 932private static IEnumerable<String> InternalEnumerateFiles(String path, String searchPattern, SearchOption searchOption) 936Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 951return InternalEnumerateFileSystemEntries(path, "*", SearchOption.TopDirectoryOnly); 965return InternalEnumerateFileSystemEntries(path, searchPattern, SearchOption.TopDirectoryOnly); 970public static IEnumerable<String> EnumerateFileSystemEntries(String path, String searchPattern, SearchOption searchOption) 976if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 986private static IEnumerable<String> InternalEnumerateFileSystemEntries(String path, String searchPattern, SearchOption searchOption) 990Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 996private static IEnumerable<String> EnumerateFileSystemNames(String path, String searchPattern, SearchOption searchOption, 1001Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly);
system\io\directoryinfo.cs (48)
338return InternalGetFiles(searchPattern, SearchOption.TopDirectoryOnly); 345public FileInfo[] GetFiles(String searchPattern, SearchOption searchOption) 349if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 360private FileInfo[] InternalGetFiles(String searchPattern, SearchOption searchOption) 363Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 375return InternalGetFiles("*", SearchOption.TopDirectoryOnly); 383return InternalGetDirectories("*", SearchOption.TopDirectoryOnly); 396return InternalGetFileSystemInfos(searchPattern, SearchOption.TopDirectoryOnly); 403public FileSystemInfo[] GetFileSystemInfos(String searchPattern, SearchOption searchOption) 407if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 418private FileSystemInfo[] InternalGetFileSystemInfos(String searchPattern, SearchOption searchOption) 421Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 434return InternalGetFileSystemInfos("*", SearchOption.TopDirectoryOnly); 448return InternalGetDirectories(searchPattern, SearchOption.TopDirectoryOnly); 456public DirectoryInfo[] GetDirectories(String searchPattern, SearchOption searchOption) 460if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 472private DirectoryInfo[] InternalGetDirectories(String searchPattern, SearchOption searchOption) 475Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 486return InternalEnumerateDirectories("*", SearchOption.TopDirectoryOnly); 497return InternalEnumerateDirectories(searchPattern, SearchOption.TopDirectoryOnly); 502public IEnumerable<DirectoryInfo> EnumerateDirectories(String searchPattern, SearchOption searchOption) 506if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 515private IEnumerable<DirectoryInfo> InternalEnumerateDirectories(String searchPattern, SearchOption searchOption) 518Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 527return InternalEnumerateFiles("*", SearchOption.TopDirectoryOnly); 538return InternalEnumerateFiles(searchPattern, SearchOption.TopDirectoryOnly); 543public IEnumerable<FileInfo> EnumerateFiles(String searchPattern, SearchOption searchOption) 547if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 556private IEnumerable<FileInfo> InternalEnumerateFiles(String searchPattern, SearchOption searchOption) 559Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 568return InternalEnumerateFileSystemInfos("*", SearchOption.TopDirectoryOnly); 579return InternalEnumerateFileSystemInfos(searchPattern, SearchOption.TopDirectoryOnly); 584public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos(String searchPattern, SearchOption searchOption) 588if ((searchOption != SearchOption.TopDirectoryOnly) && (searchOption != SearchOption.AllDirectories)) 597private IEnumerable<FileSystemInfo> InternalEnumerateFileSystemInfos(String searchPattern, SearchOption searchOption) 600Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly);
system\io\filesystemenumerable.cs (15)
41bool includeFiles, bool includeDirs, SearchOption searchOption, bool checkHost) 51internal static IEnumerable<FileInfo> CreateFileInfoIterator(String path, String originalUserPath, String searchPattern, SearchOption searchOption) 61internal static IEnumerable<DirectoryInfo> CreateDirectoryInfoIterator(String path, String originalUserPath, String searchPattern, SearchOption searchOption) 72internal static IEnumerable<FileSystemInfo> CreateFileSystemInfoIterator(String path, String originalUserPath, String searchPattern, SearchOption searchOption) 186private SearchOption searchOption; 193internal FileSystemEnumerableIterator(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler<TSource> resultHandler, bool checkHost) 198Contract.Requires(searchOption == SearchOption.AllDirectories || searchOption == SearchOption.TopDirectoryOnly); 286empty = searchData.searchOption == SearchOption.TopDirectoryOnly; 291if (searchData.searchOption == SearchOption.TopDirectoryOnly) 315private FileSystemEnumerableIterator(String fullPath, String normalizedSearchPath, String searchCriteria, String userPath, SearchOption searchOption, SearchResultHandler<TSource> resultHandler, bool checkHost) 394if (searchData.searchOption == SearchOption.TopDirectoryOnly) 414Contract.Assert(searchData.searchOption != SearchOption.TopDirectoryOnly, "should not reach this code path if searchOption == TopDirectoryOnly"); 495if (searchData.searchOption == SearchOption.TopDirectoryOnly) 558SearchOption option = localSearchData.searchOption;
System.Data.Entity (1)
System\Data\Metadata\MetadataArtifactLoaderCompositeFile.cs (1)
268SearchOption.TopDirectoryOnly
System.Web (3)
Configuration\BrowserCapabilitiesCodeGenerator.cs (3)
648DirectoryInfo[] subDirectories = rootDirectory.GetDirectories("*", SearchOption.AllDirectories); 650files = rootDirectory.GetFiles("*.browser", SearchOption.TopDirectoryOnly); 654files = subDirectories[i].GetFiles("*.browser", SearchOption.TopDirectoryOnly);