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
FileSystem.cs
Go to the documentation of this file.
1using System;
3
4namespace System.IO
5{
6 // Token: 0x02000550 RID: 1360
7 internal static class FileSystem
8 {
9 // Token: 0x06002880 RID: 10368 RVA: 0x00057E84 File Offset: 0x00056084
10 private static bool CopyDanglingSymlink(string sourceFullPath, string destFullPath)
11 {
12 /*
13An exception occurred when decompiling this method (06002880)
14
15ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.IO.FileSystem::CopyDanglingSymlink(System.String,System.String)
16
17 ---> System.Exception: Basic block has to end with unconditional control flow.
18{
19 IL_0029:
20 stloc:ErrorInfo(var_7_31, call:ErrorInfo(Sys::GetLastErrorInfo))
21 stloc:int64(var_8_34, ldc.i4:int64(0))
22 stloc:Exception(var_9_40, call:Exception(Interop::GetExceptionForIoErrno, ldloc:ErrorInfo(var_7_31), ldloc:string(sourceFullPath), ldloc:int64[exp:bool](var_8_34)))
23}
24
25 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
26 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
27 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
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 88
29 --- End of inner exception stack trace ---
30 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
31 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
32*/;
33 }
34
35 // Token: 0x06002881 RID: 10369 RVA: 0x00057ED4 File Offset: 0x000560D4
36 public static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
37 {
38 if (destFullPath != null)
39 {
40 char rawStringData = destFullPath.GetRawStringData();
41 int stringLength = destFullPath._stringLength;
42 return;
43 }
44 string fileName = Path.GetFileName(sourceFullPath);
45 string text = Path.Combine(destFullPath, fileName);
47 }
48
49 // Token: 0x06002882 RID: 10370 RVA: 0x00057F74 File Offset: 0x00056174
50 private static void LinkOrCopyFile(string sourceFullPath, string destFullPath)
51 {
52 int num = 1;
54 if (num == 0)
55 {
56 }
57 int num2 = Interop.Sys.Link(sourceFullPath, destFullPath);
58 }
59
60 // Token: 0x06002883 RID: 10371 RVA: 0x00057FD0 File Offset: 0x000561D0
61 public static void MoveFile(string sourceFullPath, string destFullPath)
62 {
63 if (!true)
64 {
65 }
66 int num;
67 if (num == 0)
68 {
69 if (!true)
70 {
71 }
72 int num2;
73 if (num2 != 0)
74 {
75 if (!true)
76 {
77 }
78 if (Interop.Sys.Rename(sourceFullPath, destFullPath) == 0)
79 {
80 return;
81 }
82 }
83 }
86 }
87
88 // Token: 0x06002884 RID: 10372 RVA: 0x00058004 File Offset: 0x00056204
89 public static void DeleteFile(string fullPath)
90 {
91 int num = 1;
92 if (num == 0)
93 {
94 }
95 int num2 = Interop.Sys.Unlink(fullPath);
96 if (num == 0)
97 {
98 }
99 Interop.ErrorInfo lastErrorInfo = Interop.Sys.GetLastErrorInfo();
101 if (lastErrorInfo != null)
102 {
103 return;
104 }
105 }
106
107 // Token: 0x06002885 RID: 10373 RVA: 0x00058064 File Offset: 0x00056264
108 public static void CreateDirectory(string fullPath)
109 {
110 int stringLength = fullPath._stringLength;
111 char rawStringData = fullPath.GetRawStringData();
112 int stringLength2 = fullPath._stringLength;
113 int num = 1;
114 char c = fullPath[num];
115 int num2 = 2;
116 char rawStringData2 = fullPath.GetRawStringData();
117 int stringLength3 = fullPath._stringLength;
118 char rawStringData3 = fullPath.GetRawStringData();
119 int stringLength4 = fullPath._stringLength;
120 long num3 = 0L;
121 string text = fullPath.Substring((int)num3, num2);
122 if (text != null)
123 {
124 char rawStringData4 = text.GetRawStringData();
125 int stringLength5 = text._stringLength;
126 return;
127 }
128 }
129
130 // Token: 0x06002886 RID: 10374 RVA: 0x00058158 File Offset: 0x00056358
132 {
133 bool flag;
134 return flag;
135 }
136
137 // Token: 0x06002887 RID: 10375 RVA: 0x00058168 File Offset: 0x00056368
138 private static bool DirectoryExists(ReadOnlySpan<char> fullPath, [Out] Interop.ErrorInfo errorInfo)
139 {
140 bool flag;
141 return flag;
142 }
143
144 // Token: 0x06002888 RID: 10376 RVA: 0x00058178 File Offset: 0x00056378
146 {
147 if (!true)
148 {
149 }
150 bool flag;
151 return flag;
152 }
153
154 // Token: 0x06002889 RID: 10377 RVA: 0x0005818C File Offset: 0x0005638C
155 private static bool FileExists(ReadOnlySpan<char> fullPath, int fileType, [Out] Interop.ErrorInfo errorInfo)
156 {
157 /*
158An exception occurred when decompiling this method (06002889)
159
160ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.IO.FileSystem::FileExists(System.ReadOnlySpan`1<System.Char>,System.Int32,Interop/ErrorInfo)
161
162 ---> System.Exception: Basic block has to end with unconditional control flow.
163{
164 IL_0009:
165 stloc:ErrorInfo(var_3_10, call:ErrorInfo(Sys::GetLastErrorInfo))
166 stfld:Error(ErrorInfo::_error, ldloc:ErrorInfo[exp:valuetype Interop/ErrorInfo&](errorInfo), ldloc:ErrorInfo[exp:Error](var_3_10))
167}
168
169 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
170 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
171 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
172 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
173 --- End of inner exception stack trace ---
174 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
175 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
176*/;
177 }
178
179 // Token: 0x0600288A RID: 10378 RVA: 0x000581B4 File Offset: 0x000563B4
180 public static void SetAttributes(string fullPath, FileAttributes attributes)
181 {
182 }
183
184 // Token: 0x0600288B RID: 10379 RVA: 0x000581C4 File Offset: 0x000563C4
186 {
187 /*
188An exception occurred when decompiling this method (0600288B)
189
190ICSharpCode.Decompiler.DecompilerException: Error decompiling System.DateTimeOffset System.IO.FileSystem::GetCreationTime(System.String)
191
192 ---> System.Exception: Basic block has to end with unconditional control flow.
193{
194 Block_0:
195 stloc:DateTimeOffset(var_1_06, call:DateTimeOffset(DateTimeOffset::op_Implicit, ldloc:DateTime(var_0)))
196}
197
198 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
199 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
200 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
201 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
202 --- End of inner exception stack trace ---
203 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
204 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
205*/;
206 }
207
208 // Token: 0x0600288C RID: 10380 RVA: 0x000581D8 File Offset: 0x000563D8
210 {
211 /*
212An exception occurred when decompiling this method (0600288C)
213
214ICSharpCode.Decompiler.DecompilerException: Error decompiling System.DateTimeOffset System.IO.FileSystem::GetLastAccessTime(System.String)
215
216 ---> System.Exception: Basic block has to end with unconditional control flow.
217{
218 Block_0:
219 stloc:DateTimeOffset(var_1_06, call:DateTimeOffset(DateTimeOffset::op_Implicit, ldloc:DateTime(var_0)))
220}
221
222 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
223 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
224 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
225 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
226 --- End of inner exception stack trace ---
227 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
228 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
229*/;
230 }
231
232 // Token: 0x0600288D RID: 10381 RVA: 0x000581EC File Offset: 0x000563EC
234 {
235 /*
236An exception occurred when decompiling this method (0600288D)
237
238ICSharpCode.Decompiler.DecompilerException: Error decompiling System.DateTimeOffset System.IO.FileSystem::GetLastWriteTime(System.String)
239
240 ---> System.Exception: Basic block has to end with unconditional control flow.
241{
242 Block_0:
243 stloc:DateTimeOffset(var_1_06, call:DateTimeOffset(DateTimeOffset::op_Implicit, ldloc:DateTime(var_0)))
244}
245
246 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
247 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
248 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
249 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
250 --- End of inner exception stack trace ---
251 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
252 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
253*/;
254 }
255 }
256}
class f__AnonymousType0<< Count > j__TPar
static DateTimeOffset GetLastAccessTime(string fullPath)
static void DeleteFile(string fullPath)
Definition FileSystem.cs:89
static bool FileExists(ReadOnlySpan< char > fullPath)
static DateTimeOffset GetLastWriteTime(string fullPath)
static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
Definition FileSystem.cs:36
static void CreateDirectory(string fullPath)
static void LinkOrCopyFile(string sourceFullPath, string destFullPath)
Definition FileSystem.cs:50
static bool CopyDanglingSymlink(string sourceFullPath, string destFullPath)
Definition FileSystem.cs:10
static bool FileExists(ReadOnlySpan< char > fullPath, int fileType, [Out] Interop.ErrorInfo errorInfo)
static void MoveFile(string sourceFullPath, string destFullPath)
Definition FileSystem.cs:61
static DateTimeOffset GetCreationTime(string fullPath)
static bool DirectoryExists(ReadOnlySpan< char > fullPath, [Out] Interop.ErrorInfo errorInfo)
static bool DirectoryExists(ReadOnlySpan< char > fullPath)
static void SetAttributes(string fullPath, FileAttributes attributes)
static string TrimEndingDirectorySeparator(string path)
static string Combine(string path1, string path2)
Definition Path.cs:41
static string GetFileName(string path)
Definition Path.cs:142