-
Notifications
You must be signed in to change notification settings - Fork 4
/
Enumerations.cs
78 lines (64 loc) · 1.75 KB
/
Enumerations.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
namespace Menees
{
#region Using Directives
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
#endregion
#region Public ToHexOptions
/// <summary>
/// Options for <see cref="ConvertUtility.ToHex"/>.
/// </summary>
[Flags]
public enum ToHexOptions
{
/// <summary>
/// Default formatting (uppercase with no 0x prefix)
/// </summary>
None = 0,
/// <summary>
/// Use lowercase hex characters
/// </summary>
Lowercase = 1,
/// <summary>
/// Adds a "0x" prefix to the output.
/// </summary>
Include0xPrefix = 2,
}
#endregion
#region Public ValidPathOptions
/// <summary>
/// The supported options for <see cref="FileUtility.IsValidPath"/>.
/// </summary>
[Flags]
public enum ValidPathOptions
{
/// <summary>
/// Use the default behavior with no options.
/// </summary>
None = 0,
/// <summary>
/// Whether a path is allowed to end with a separator (e.g., if the caller knows they're validating a directory path).
/// </summary>
AllowTrailingSeparator = 1,
/// <summary>
/// Whether paths can contain parts equal to "." or ".." and can omit a root (e.g., Drive: or \\Server\Share).
/// </summary>
AllowRelative = 2,
/// <summary>
/// Whether paths over MAX_PATH are allowed if prefixed with \\?\.
/// </summary>
/// <remarks>
/// When a long path is used, then '/' can't be used as a part separator, and the path can't be relative.
/// </remarks>
AllowLongPaths = 4,
/// <summary>
/// Whether a prefix of "\\.\" can be used to reference device paths (e.g., \\.\PhysicalDisk1)
/// and whether drive names (e.g., C:) and UNC paths without a share can be used (e.g., \\Server).
/// </summary>
AllowDevicePaths = 8,
}
#endregion
}