Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
FileStreamOptions.cs
Go to the documentation of this file.
1namespace System.IO;
2
3public sealed class FileStreamOptions
4{
5 private FileMode _mode = FileMode.Open;
6
8
9 private FileShare _share = FileShare.Read;
10
12
13 private long _preallocationSize;
14
15 private int _bufferSize = 4096;
16
17 public FileMode Mode
18 {
19 get
20 {
21 return _mode;
22 }
23 set
24 {
25 if (value < FileMode.CreateNew || value > FileMode.Append)
26 {
28 }
29 _mode = value;
30 }
31 }
32
34 {
35 get
36 {
37 return _access;
38 }
39 set
40 {
41 if (value < FileAccess.Read || value > FileAccess.ReadWrite)
42 {
44 }
45 _access = value;
46 }
47 }
48
50 {
51 get
52 {
53 return _share;
54 }
55 set
56 {
57 FileShare fileShare = value & ~FileShare.Inheritable;
58 if ((fileShare < FileShare.None) || fileShare > (FileShare.ReadWrite | FileShare.Delete))
59 {
61 }
62 _share = value;
63 }
64 }
65
67 {
68 get
69 {
70 return _options;
71 }
72 set
73 {
74 if (value != 0 && (value & (FileOptions)67092479) != 0)
75 {
77 }
79 }
80 }
81
83 {
84 get
85 {
86 return _preallocationSize;
87 }
88 set
89 {
90 if (value < 0)
91 {
93 }
95 }
96 }
97
98 public int BufferSize
99 {
100 get
101 {
102 return _bufferSize;
103 }
104 set
105 {
106 if (value < 0)
107 {
109 }
111 }
112 }
113}
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7
static void ArgumentOutOfRangeException_Enum_Value()