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
FileSystemEnumerator.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x0200057F RID: 1407
12 {
13 // Token: 0x06002A34 RID: 10804 RVA: 0x0005BC34 File Offset: 0x00059E34
14 public FileSystemEnumerator(string directory, [Optional] EnumerationOptions options)
15 {
16 if (directory != null)
17 {
21 if (options == null)
22 {
23 if (!true)
24 {
25 }
26 string rootDirectory = this._rootDirectory;
27 }
29 int num = 1;
30 this._lastEntryFound = num != 0;
31 string rootDirectory2 = this._rootDirectory;
33 if (rootDirectory2 == null)
34 {
35 }
36 int readDirRBufferSize = Interop.Sys.GetReadDirRBufferSize();
37 return;
38 }
39 }
40
41 // Token: 0x06002A35 RID: 10805 RVA: 0x0005BCB4 File Offset: 0x00059EB4
42 private bool InternalContinueOnError(Interop.ErrorInfo info, bool ignoreNotFound = false)
43 {
44 while (!this._options.<IgnoreInaccessible>k__BackingField)
45 {
46 }
47 return true;
48 }
49
50 // Token: 0x06002A36 RID: 10806 RVA: 0x0005BCD0 File Offset: 0x00059ED0
51 private static bool IsDirectoryNotFound(Interop.ErrorInfo info)
52 {
53 }
54
55 // Token: 0x06002A37 RID: 10807 RVA: 0x0005BCE0 File Offset: 0x00059EE0
56 private static bool IsAccessError(Interop.ErrorInfo info)
57 {
58 }
59
60 // Token: 0x06002A38 RID: 10808 RVA: 0x0005BCF0 File Offset: 0x00059EF0
61 private IntPtr CreateDirectoryHandle(string path, bool ignoreNotFound = false)
62 {
63 /*
64An exception occurred when decompiling this method (06002A38)
65
66ICSharpCode.Decompiler.DecompilerException: Error decompiling System.IntPtr System.IO.Enumeration.FileSystemEnumerator`1::CreateDirectoryHandle(System.String,System.Boolean)
67
68 ---> System.Exception: Basic block has to end with unconditional control flow.
69{
70 IL_0003:
71 stloc:native int(var_0_09, call:native int(Sys::OpenDir, ldloc:string(path)))
72 stloc:Exception(var_3_18, call:Exception(Interop::GetExceptionForIoErrno, call:ErrorInfo(Sys::GetLastErrorInfo), ldloc:string(path), ldc.i4:bool(1)))
73}
74
75 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
76 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
77 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
78 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
79 --- End of inner exception stack trace ---
80 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
81 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
82*/;
83 }
84
85 // Token: 0x06002A39 RID: 10809 RVA: 0x0005BD18 File Offset: 0x00059F18
86 private void CloseDirectoryHandle()
87 {
89 int num = Interop.Sys.CloseDir(intPtr);
90 }
91
92 // Token: 0x06002A3A RID: 10810 RVA: 0x0000207A File Offset: 0x0000027A
93 public bool MoveNext()
94 {
95 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
96 }
97
98 // Token: 0x06002A3B RID: 10811 RVA: 0x0005BD30 File Offset: 0x00059F30
99 private void FindNextEntry()
100 {
101 }
102
103 // Token: 0x06002A3C RID: 10812 RVA: 0x0005BD40 File Offset: 0x00059F40
105 {
106 int num = 1;
108 if (num == 0)
109 {
110 }
111 int num2;
112 if (num2 != 0)
113 {
114 return;
115 }
116 }
117
118 // Token: 0x06002A3D RID: 10813 RVA: 0x0005BD64 File Offset: 0x00059F64
119 private bool DequeueNextDirectory()
120 {
121 bool flag;
122 if (flag)
123 {
127 bool flag2;
128 return flag2;
129 }
130 }
131
132 // Token: 0x06002A3E RID: 10814 RVA: 0x0005BD88 File Offset: 0x00059F88
133 private void InternalDispose(bool disposing)
134 {
135 if (true)
136 {
137 }
138 if (!false)
139 {
140 return;
141 }
142 throw new OutOfMemoryException();
143 }
144
145 // Token: 0x06002A3F RID: 10815 RVA: 0x0005BDB8 File Offset: 0x00059FB8
146 protected virtual bool ShouldIncludeEntry(FileSystemEntry entry)
147 {
148 return true;
149 }
150
151 // Token: 0x06002A40 RID: 10816 RVA: 0x0005BDC8 File Offset: 0x00059FC8
152 protected virtual bool ShouldRecurseIntoEntry(FileSystemEntry entry)
153 {
154 return true;
155 }
156
157 // Token: 0x06002A41 RID: 10817
158 protected abstract TResult TransformEntry(FileSystemEntry entry);
159
160 // Token: 0x06002A42 RID: 10818 RVA: 0x0005BDD8 File Offset: 0x00059FD8
161 protected virtual void OnDirectoryFinished(ReadOnlySpan<char> directory)
162 {
163 }
164
165 // Token: 0x06002A43 RID: 10819 RVA: 0x0005BDE8 File Offset: 0x00059FE8
166 protected virtual bool ContinueOnError(int error)
167 {
168 }
169
170 // Token: 0x1700060F RID: 1551
171 // (get) Token: 0x06002A44 RID: 10820 RVA: 0x0000207A File Offset: 0x0000027A
173 {
174 get
175 {
176 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
177 }
178 }
179
180 // Token: 0x17000610 RID: 1552
181 // (get) Token: 0x06002A45 RID: 10821 RVA: 0x0000207A File Offset: 0x0000027A
183 {
184 get
185 {
186 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
187 }
188 }
189
190 // Token: 0x06002A46 RID: 10822 RVA: 0x0000207A File Offset: 0x0000027A
191 private void DirectoryFinished()
192 {
193 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
194 }
195
196 // Token: 0x06002A47 RID: 10823 RVA: 0x0000207A File Offset: 0x0000027A
197 public void Reset()
198 {
199 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
200 }
201
202 // Token: 0x06002A48 RID: 10824 RVA: 0x0005BDF8 File Offset: 0x00059FF8
203 public void Dispose()
204 {
205 if (!true)
206 {
207 }
208 GC.SuppressFinalize(this);
209 }
210
211 // Token: 0x06002A49 RID: 10825 RVA: 0x0005BE10 File Offset: 0x0005A010
212 protected virtual void Dispose(bool disposing)
213 {
214 }
215
216 // Token: 0x06002A4A RID: 10826 RVA: 0x0005BE20 File Offset: 0x0005A020
217 protected override void Finalize()
218 {
219 base.Finalize();
220 }
221
222 // Token: 0x040016A8 RID: 5800
224
225 // Token: 0x040016A9 RID: 5801
226 private readonly string _rootDirectory;
227
228 // Token: 0x040016AA RID: 5802
230
231 // Token: 0x040016AB RID: 5803
232 private readonly object _lock;
233
234 // Token: 0x040016AC RID: 5804
235 private string _currentPath;
236
237 // Token: 0x040016AD RID: 5805
239
240 // Token: 0x040016AE RID: 5806
241 private bool _lastEntryFound;
242
243 // Token: 0x040016AF RID: 5807
245
246 // Token: 0x040016B0 RID: 5808
248
249 // Token: 0x040016B1 RID: 5809
251
252 // Token: 0x040016B2 RID: 5810
253 private char[] _pathBuffer;
254
255 // Token: 0x040016B3 RID: 5811
256 private byte[] _entryBuffer;
257 }
258}
class f__AnonymousType0<< Count > j__TPar
static void SuppressFinalize(object obj)
Definition GC.cs:116
static bool IsDirectoryNotFound(Interop.ErrorInfo info)
TResult TransformEntry(FileSystemEntry entry)
virtual bool ShouldIncludeEntry(FileSystemEntry entry)
virtual bool ShouldRecurseIntoEntry(FileSystemEntry entry)
FileSystemEnumerator(string directory, [Optional] EnumerationOptions options)
unsafe void FindNextEntry(byte *entryBufferPtr, int bufferLength)
virtual void OnDirectoryFinished(ReadOnlySpan< char > directory)
IntPtr CreateDirectoryHandle(string path, bool ignoreNotFound=false)
static bool IsAccessError(Interop.ErrorInfo info)
bool InternalContinueOnError(Interop.ErrorInfo info, bool ignoreNotFound=false)
static string TrimEndingDirectorySeparator(string path)
static string GetFullPath(string path)
Definition Path.cs:170