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
CacheFileManager.cs
Go to the documentation of this file.
1using System;
3using System.IO;
7
8// Token: 0x0200006B RID: 107
10{
11 // Token: 0x06000236 RID: 566 RVA: 0x00006578 File Offset: 0x00004778
19
20 // Token: 0x06000237 RID: 567 RVA: 0x000065A4 File Offset: 0x000047A4
21 public void Shutdown()
22 {
24 if (uploadThread != null && uploadThread.IsAlive)
25 {
27 if (uploadThread == null)
28 {
29 }
31 }
33 if (syncThread != null && syncThread.IsAlive)
34 {
36 if (syncThread == null)
37 {
38 }
40 }
41 }
42
43 // Token: 0x06000238 RID: 568 RVA: 0x000065F8 File Offset: 0x000047F8
44 public void ResyncFiles()
45 {
46 bool flag = this.uploadPending.Reset();
47 if (!true)
48 {
49 }
52 }
53
54 // Token: 0x06000239 RID: 569 RVA: 0x000021DB File Offset: 0x000003DB
55 public void FileSyncInternal(object threadContext)
56 {
57 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
58 }
59
60 // Token: 0x0600023A RID: 570 RVA: 0x0000661C File Offset: 0x0000481C
61 private void SyncFolder(string folderPath, bool recursive = false)
62 {
63 FileAPI fileAPI = this.fileAPI;
64 }
65
66 // Token: 0x0600023B RID: 571 RVA: 0x000021DB File Offset: 0x000003DB
67 private CachedFile GetFile(string path, bool create = true)
68 {
69 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
70 }
71
72 // Token: 0x0600023C RID: 572 RVA: 0x0000665C File Offset: 0x0000485C
73 public void SyncFile(string filePath)
74 {
75 int num = 1;
76 CachedFile file = this.GetFile(filePath, num != 0);
77 FileAPI fileAPI = this.fileAPI;
78 string filename = file.Filename;
79 }
80
81 // Token: 0x0600023D RID: 573 RVA: 0x000066D0 File Offset: 0x000048D0
82 private void FileUpload(object threadContext)
83 {
84 int num = 1;
86 PlatformUser user = this.User;
89 if (localUser != null)
90 {
91 localUser.LoadThreadstate();
92 }
93 FileAPI fileAPI = this.fileAPI;
94 this.UploadingFiles = num != 0;
95 }
96
97 // Token: 0x0600023E RID: 574 RVA: 0x00006784 File Offset: 0x00004984
98 public string GetUserSavePath()
99 {
100 return this._userSavePath;
101 }
102
103 // Token: 0x0600023F RID: 575 RVA: 0x00006798 File Offset: 0x00004998
104 public void LegacySync()
105 {
106 }
107
108 // Token: 0x06000240 RID: 576 RVA: 0x000067A8 File Offset: 0x000049A8
109 public void Mount(bool forSync)
110 {
111 }
112
113 // Token: 0x06000241 RID: 577 RVA: 0x000067B8 File Offset: 0x000049B8
114 public void Unmount(bool forSync)
115 {
116 }
117
118 // Token: 0x06000242 RID: 578 RVA: 0x000067C8 File Offset: 0x000049C8
119 public void CreateDirectory(string directory)
120 {
121 }
122
123 // Token: 0x06000243 RID: 579 RVA: 0x000067D8 File Offset: 0x000049D8
124 public void InSync()
125 {
127 int size = this.modifications._size;
128 bool flag = this.uploadPending.Set();
129 }
130
131 // Token: 0x06000244 RID: 580 RVA: 0x000021DB File Offset: 0x000003DB
132 public void WriteFile(string filename, byte[] fileData)
133 {
134 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
135 }
136
137 // Token: 0x06000245 RID: 581 RVA: 0x000021DB File Offset: 0x000003DB
138 public void Delete(string filename)
139 {
140 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
141 }
142
143 // Token: 0x06000246 RID: 582 RVA: 0x0000683C File Offset: 0x00004A3C
144 public byte[] ReadFile(string filename)
145 {
147 do
148 {
149 file = this.GetFile(filename, true);
150 }
151 while (file == null);
152 return file.<Data>k__BackingField;
153 }
154
155 // Token: 0x06000247 RID: 583 RVA: 0x0000685C File Offset: 0x00004A5C
156 public string CleanPath(string path)
157 {
158 if (!true)
159 {
160 }
161 string text = FileUtilities.CleanSwitchPath(path);
162 string text2;
163 return text2.Replace("//", "/");
164 }
165
166 // Token: 0x06000248 RID: 584 RVA: 0x00006884 File Offset: 0x00004A84
167 public string[] GetFiles(string path, string searchPattern)
168 {
169 int size = this.allFiles._size;
170 throw new OutOfMemoryException();
171 }
172
173 // Token: 0x06000249 RID: 585 RVA: 0x000068AC File Offset: 0x00004AAC
174 public string[] GetFolders(string path)
175 {
176 }
177
178 // Token: 0x0600024A RID: 586 RVA: 0x000021DB File Offset: 0x000003DB
180 {
181 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
182 }
183
184 // Token: 0x0600024B RID: 587 RVA: 0x000068BC File Offset: 0x00004ABC
185 public bool Exists(string filename)
186 {
187 /*
188An exception occurred when decompiling this method (0600024B)
189
190ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean CacheFileManager::Exists(System.String)
191
192 ---> System.Exception: Basic block has to end with unconditional control flow.
193{
194 Block_0:
195 stloc:uint8[](var_2_14, ldfld:uint8[](CachedFile::<Data>k__BackingField, ldloc:CachedFile(var_1_0A)))
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: 0x0600024C RID: 588 RVA: 0x000068E0 File Offset: 0x00004AE0
209 public void SetAttributes(string filename, FileAttributes fileAttributes)
210 {
211 }
212
213 // Token: 0x0400020C RID: 524
214 public bool UploadingFiles;
215
216 // Token: 0x0400020D RID: 525
218
219 // Token: 0x0400020E RID: 526
221
222 // Token: 0x0400020F RID: 527
224
225 // Token: 0x04000210 RID: 528
227
228 // Token: 0x04000211 RID: 529
230
231 // Token: 0x04000212 RID: 530
232 private readonly bool PrimaryUser;
233
234 // Token: 0x04000213 RID: 531
236
237 // Token: 0x04000214 RID: 532
239
240 // Token: 0x04000215 RID: 533
242
243 // Token: 0x04000216 RID: 534
244 private string _userSavePath;
245}
class f__AnonymousType0<< Count > j__TPar
void FileSyncInternal(object threadContext)
CachedFile GetFile(string path, bool create=true)
string[] GetFiles(string path, string searchPattern)
ManagedThread SyncThread
bool Exists(string filename)
ManualResetEvent uploadPending
readonly FileAPI fileAPI
List< CachedFile > modifications
byte[] ReadFile(string filename)
void Mount(bool forSync)
string CleanPath(string path)
void SyncFolder(string folderPath, bool recursive=false)
void WriteFile(string filename, byte[] fileData)
readonly bool PrimaryUser
void GetFileModifications(List< CachedFile > files)
ManagedThread UploadThread
CacheFileManager(FileManager fileMan, FileAPI api, bool primaryUser, PlatformUser user)
readonly PlatformUser User
void FileUpload(object threadContext)
readonly FileManager fileManager
void Delete(string filename)
void SetAttributes(string filename, FileAttributes fileAttributes)
void Unmount(bool forSync)
string[] GetFolders(string path)
void CreateDirectory(string directory)
List< CachedFile > allFiles
void SyncFile(string filePath)
void LoadThreadstate()
Definition LocalUser.cs:40
static string CleanSwitchPath(string path)
static void TerminateThread(ManagedThread thread)
static LocalUser FindLocalUserByUser(PlatformUser user)
PlatformUser.Platform PlatformId