terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
File.cs
Go to the documentation of this file.
1using System;
3
4namespace System.IO
5{
6 // Token: 0x0200054D RID: 1357
7 public static class File
8 {
9 // Token: 0x06002859 RID: 10329 RVA: 0x00057918 File Offset: 0x00055B18
10 public static StreamReader OpenText(string path)
11 {
12 /*
13An exception occurred when decompiling this method (06002859)
14
15ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IO.StreamReader System.IO.File::OpenText(System.String)
16
17 ---> System.Exception: Basic block has to end with unconditional control flow.
18{
19 Block_0:
20 stloc:Encoding(var_1_07, callgetter:Encoding(Encoding::get_UTF8))
21}
22
23 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
24 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
25 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
26 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
27 --- End of inner exception stack trace ---
28 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
29 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
30*/;
31 }
32
33 // Token: 0x0600285A RID: 10330 RVA: 0x0005792C File Offset: 0x00055B2C
34 public static void Copy(string sourceFileName, string destFileName)
35 {
36 long num = 0L;
38 }
39
40 // Token: 0x0600285B RID: 10331 RVA: 0x00057944 File Offset: 0x00055B44
41 public static void Copy(string sourceFileName, string destFileName, bool overwrite)
42 {
43 while (sourceFileName != null)
44 {
45 if (destFileName == null)
46 {
47 return;
48 }
49 if (sourceFileName._stringLength == 0)
50 {
51 return;
52 }
53 if (destFileName._stringLength != 0)
54 {
58 return;
59 }
60 }
61 }
62
63 // Token: 0x0600285C RID: 10332 RVA: 0x00057980 File Offset: 0x00055B80
64 public static FileStream Create(string path)
65 {
67 return fileStream;
68 }
69
70 // Token: 0x0600285D RID: 10333 RVA: 0x0000207A File Offset: 0x0000027A
71 public static FileStream Create(string path, int bufferSize)
72 {
73 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
74 }
75
76 // Token: 0x0600285E RID: 10334 RVA: 0x00057990 File Offset: 0x00055B90
77 public static void Delete(string path)
78 {
79 while (path == null)
80 {
81 }
83 }
84
85 // Token: 0x0600285F RID: 10335 RVA: 0x000579AC File Offset: 0x00055BAC
86 public static bool Exists(string path)
87 {
88 string text;
89 if (true)
90 {
91 long num = 0L;
92 int stringLength = text._stringLength;
93 char c = text[(int)num];
94 }
95 char rawStringData = text.GetRawStringData();
96 int stringLength2 = text._stringLength;
97 bool flag;
98 return flag;
99 }
100
101 // Token: 0x06002860 RID: 10336 RVA: 0x000579F4 File Offset: 0x00055BF4
102 public static FileStream Open(string path, FileMode mode)
103 {
105 return fileStream;
106 }
107
108 // Token: 0x06002861 RID: 10337 RVA: 0x0000207A File Offset: 0x0000027A
109 public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share)
110 {
111 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
112 }
113
114 // Token: 0x06002862 RID: 10338 RVA: 0x00057A04 File Offset: 0x00055C04
115 public static DateTime GetCreationTime(string path)
116 {
117 if (!true)
118 {
119 }
121 return 1;
122 }
123
124 // Token: 0x06002863 RID: 10339 RVA: 0x00057A28 File Offset: 0x00055C28
125 public static DateTime GetLastAccessTime(string path)
126 {
127 if (!true)
128 {
129 }
131 return 1;
132 }
133
134 // Token: 0x06002864 RID: 10340 RVA: 0x00057A4C File Offset: 0x00055C4C
135 public static DateTime GetLastWriteTime(string path)
136 {
137 if (!true)
138 {
139 }
141 return 1;
142 }
143
144 // Token: 0x06002865 RID: 10341 RVA: 0x00057A70 File Offset: 0x00055C70
145 public static void SetAttributes(string path, FileAttributes fileAttributes)
146 {
147 if (true)
148 {
149 FileSystem.SetAttributes(Path.GetFullPath(path), fileAttributes);
150 return;
151 }
152 Path.Validate(path);
153 if (!true)
154 {
155 }
156 }
157
158 // Token: 0x06002866 RID: 10342 RVA: 0x0000207A File Offset: 0x0000027A
159 public static FileStream OpenRead(string path)
160 {
161 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
162 }
163
164 // Token: 0x06002867 RID: 10343 RVA: 0x00057A98 File Offset: 0x00055C98
165 public static byte[] ReadAllBytes(string path)
166 {
167 if (!false)
168 {
169 byte[] array;
170 return array;
171 }
172 throw new OutOfMemoryException();
173 }
174
175 // Token: 0x06002868 RID: 10344 RVA: 0x00057ACC File Offset: 0x00055CCC
176 private static byte[] ReadAllBytesUnknownLength(FileStream fs)
177 {
178 /*
179An exception occurred when decompiling this method (06002868)
180
181ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.IO.File::ReadAllBytesUnknownLength(System.IO.FileStream)
182
183 ---> System.Exception: Basic block has to end with unconditional control flow.
184{
185 IL_0032:
186 call:void(ThrowHelper::ThrowArgumentOutOfRangeException)
187}
188
189 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
190 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
191 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
192 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
193 --- End of inner exception stack trace ---
194 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
195 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
196*/;
197 }
198
199 // Token: 0x06002869 RID: 10345 RVA: 0x00057B14 File Offset: 0x00055D14
200 public static void WriteAllBytes(string path, byte[] bytes)
201 {
202 while (path != null)
203 {
204 if (path._stringLength == 0)
205 {
206 return;
207 }
208 if (bytes != null)
209 {
210 File.InternalWriteAllBytes(path, bytes);
211 return;
212 }
213 }
214 }
215
216 // Token: 0x0600286A RID: 10346 RVA: 0x00057B38 File Offset: 0x00055D38
217 private static void InternalWriteAllBytes(string path, byte[] bytes)
218 {
219 }
220
221 // Token: 0x0600286B RID: 10347 RVA: 0x00057B60 File Offset: 0x00055D60
222 public static void Move(string sourceFileName, string destFileName)
223 {
224 while (sourceFileName != null)
225 {
226 if (destFileName == null)
227 {
228 return;
229 }
230 if (sourceFileName._stringLength == 0)
231 {
232 return;
233 }
234 if (destFileName._stringLength != 0)
235 {
238 if (fullPath != null)
239 {
240 char rawStringData = fullPath.GetRawStringData();
241 int stringLength = fullPath._stringLength;
242 return;
243 }
245 return;
246 }
247 }
248 }
249 }
250}
class f__AnonymousType0<< Count > j__TPar
static DateTimeOffset GetLastAccessTime(string fullPath)
static void DeleteFile(string fullPath)
Definition FileSystem.cs:89
static DateTimeOffset GetLastWriteTime(string fullPath)
static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
Definition FileSystem.cs:36
static void MoveFile(string sourceFullPath, string destFullPath)
Definition FileSystem.cs:61
static DateTimeOffset GetCreationTime(string fullPath)
static void SetAttributes(string fullPath, FileAttributes attributes)
static void SetAttributes(string path, FileAttributes fileAttributes)
Definition File.cs:145
static FileStream Create(string path)
Definition File.cs:64
static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share)
Definition File.cs:109
static DateTime GetLastAccessTime(string path)
Definition File.cs:125
static FileStream OpenRead(string path)
Definition File.cs:159
static byte[] ReadAllBytesUnknownLength(FileStream fs)
Definition File.cs:176
static DateTime GetCreationTime(string path)
Definition File.cs:115
static void InternalWriteAllBytes(string path, byte[] bytes)
Definition File.cs:217
static DateTime GetLastWriteTime(string path)
Definition File.cs:135
static FileStream Open(string path, FileMode mode)
Definition File.cs:102
static StreamReader OpenText(string path)
Definition File.cs:10
static void Copy(string sourceFileName, string destFileName)
Definition File.cs:34
static bool Exists(string path)
Definition File.cs:86
static FileStream Create(string path, int bufferSize)
Definition File.cs:71
static byte[] ReadAllBytes(string path)
Definition File.cs:165
static void Copy(string sourceFileName, string destFileName, bool overwrite)
Definition File.cs:41
static void Move(string sourceFileName, string destFileName)
Definition File.cs:222
static void WriteAllBytes(string path, byte[] bytes)
Definition File.cs:200
static void Delete(string path)
Definition File.cs:77
static string GetFullPath(string path)
Definition Path.cs:170
static void Validate(string path)
Definition Path.cs:437