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