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
DefaultFileAPI.cs
Go to the documentation of this file.
1using System;
2using System.IO;
3using Terraria;
4using UnityEngine;
5
6// Token: 0x0200006C RID: 108
7public class DefaultFileAPI : FileAPI
8{
9 // Token: 0x0600024D RID: 589 RVA: 0x000068F0 File Offset: 0x00004AF0
11 {
12 if (!true)
13 {
14 }
15 Debug.Log("DefaultFileAPI");
16 this.platformUser = user;
17 }
18
19 // Token: 0x0600024E RID: 590 RVA: 0x00006918 File Offset: 0x00004B18
20 public void Shutdown()
21 {
22 }
23
24 // Token: 0x0600024F RID: 591 RVA: 0x00006928 File Offset: 0x00004B28
25 public string GetUserSavePath()
26 {
27 if (Application.persistentDataPath._stringLength == 0)
28 {
29 Debug.Log("SetupPaths: Unity path is empty. Trying native method...");
30 }
31 string text;
33 return text;
34 }
35
36 // Token: 0x06000250 RID: 592 RVA: 0x0000695C File Offset: 0x00004B5C
37 public void LegacySync()
38 {
39 }
40
41 // Token: 0x06000251 RID: 593 RVA: 0x0000696C File Offset: 0x00004B6C
42 public void Mount(bool forSync)
43 {
44 bool flag = string.IsNullOrEmpty(this._userSavePath);
45 string savePath = Main.SavePath;
46 this._userSavePath = savePath;
47 }
48
49 // Token: 0x06000252 RID: 594 RVA: 0x00006994 File Offset: 0x00004B94
50 public void Unmount(bool forSync)
51 {
52 }
53
54 // Token: 0x06000253 RID: 595 RVA: 0x000069A4 File Offset: 0x00004BA4
55 public void CreateDirectory(string directory)
56 {
58 }
59
60 // Token: 0x06000254 RID: 596 RVA: 0x000069B8 File Offset: 0x00004BB8
61 public void WriteFile(string filename, byte[] fileData)
62 {
63 if (!true)
64 {
65 }
66 string directoryName = Path.GetDirectoryName(filename);
67 bool flag = Directory.Exists(directoryName);
69 File.WriteAllBytes(filename, fileData);
70 }
71
72 // Token: 0x06000255 RID: 597 RVA: 0x000069E4 File Offset: 0x00004BE4
73 public void Delete(string filename)
74 {
75 File.Delete(filename);
76 }
77
78 // Token: 0x06000256 RID: 598 RVA: 0x000069F8 File Offset: 0x00004BF8
79 public byte[] ReadFile(string filename)
80 {
81 return File.ReadAllBytes(filename);
82 }
83
84 // Token: 0x06000257 RID: 599 RVA: 0x00006A0C File Offset: 0x00004C0C
85 public string[] GetFiles(string path, string searchPattern)
86 {
87 bool flag = Directory.Exists(path);
88 return Directory.GetFiles(path, searchPattern);
89 }
90
91 // Token: 0x06000258 RID: 600 RVA: 0x00006A2C File Offset: 0x00004C2C
92 public string[] GetFolders(string path)
93 {
94 bool flag = Directory.Exists(path);
95 return Directory.GetDirectories(path);
96 }
97
98 // Token: 0x06000259 RID: 601 RVA: 0x00006A48 File Offset: 0x00004C48
99 public bool Exists(string filename)
100 {
101 return File.Exists(filename);
102 }
103
104 // Token: 0x0600025A RID: 602 RVA: 0x00006A5C File Offset: 0x00004C5C
105 public void SetAttributes(string filename, FileAttributes fileAttributes)
106 {
107 File.SetAttributes(filename, fileAttributes);
108 }
109
110 // Token: 0x04000217 RID: 535
111 private int mountCount;
112
113 // Token: 0x04000218 RID: 536
114 private string _userSavePath;
115
116 // Token: 0x04000219 RID: 537
118}
class f__AnonymousType0<< Count > j__TPar
byte[] ReadFile(string filename)
void SetAttributes(string filename, FileAttributes fileAttributes)
void Mount(bool forSync)
void WriteFile(string filename, byte[] fileData)
void CreateDirectory(string directory)
string[] GetFiles(string path, string searchPattern)
bool Exists(string filename)
string[] GetFolders(string path)
void Delete(string filename)
void Unmount(bool forSync)
PlatformUser platformUser
string GetUserSavePath()
DefaultFileAPI(PlatformUser user)
static string[] GetDirectories(string path)
Definition Directory.cs:126
static bool Exists(string path)
Definition Directory.cs:64
static DirectoryInfo CreateDirectory(string path)
Definition Directory.cs:40
static string[] GetFiles(string path)
Definition Directory.cs:83
static void SetAttributes(string path, FileAttributes fileAttributes)
Definition File.cs:145
static bool Exists(string path)
Definition File.cs:86
static byte[] ReadAllBytes(string path)
Definition File.cs:165
static void WriteAllBytes(string path, byte[] bytes)
Definition File.cs:200
static void Delete(string path)
Definition File.cs:77
static string GetDirectoryName(string path)
Definition Path.cs:86
static string SavePath
Definition Main.cs:4045
static string persistentDataPath
static void Log(object message)
Definition Debug.cs:51