Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EnumerationOptions.cs
Go to the documentation of this file.
1namespace System.IO;
2
4{
5 private int _maxRecursionDepth;
6
7 internal static EnumerationOptions Compatible { get; } = new EnumerationOptions
8 {
9 MatchType = MatchType.Win32,
11 IgnoreInaccessible = false
12 };
13
14
22
23
24 internal static EnumerationOptions Default { get; } = new EnumerationOptions();
25
26
27 public bool RecurseSubdirectories { get; set; }
28
29 public bool IgnoreInaccessible { get; set; }
30
31 public int BufferSize { get; set; }
32
33 public FileAttributes AttributesToSkip { get; set; }
34
35 public MatchType MatchType { get; set; }
36
37 public MatchCasing MatchCasing { get; set; }
38
40 {
41 get
42 {
43 return _maxRecursionDepth;
44 }
45 set
46 {
47 if (value < 0)
48 {
50 }
52 }
53 }
54
55 public bool ReturnSpecialDirectories { get; set; }
56
58 {
59 IgnoreInaccessible = true;
60 AttributesToSkip = FileAttributes.Hidden | FileAttributes.System;
61 MaxRecursionDepth = int.MaxValue;
62 }
63
64 internal static EnumerationOptions FromSearchOption(SearchOption searchOption)
65 {
66 if (searchOption != 0 && searchOption != SearchOption.AllDirectories)
67 {
69 }
70 if (searchOption != SearchOption.AllDirectories)
71 {
72 return Compatible;
73 }
75 }
76}
static EnumerationOptions FromSearchOption(SearchOption searchOption)
static EnumerationOptions Default
static EnumerationOptions Compatible
static EnumerationOptions CompatibleRecursive
static string ArgumentOutOfRange_Enum
Definition SR.cs:18
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7