tModLoader v2024.04
A mod to make and play Terraria mods
FileUtilities Class Reference

Static Public Member Functions

static string ConvertToRelativePath (string basePath, string fullPath)
 Converts the full 'path' to remove the base path component. Example: C://My Documents//Help Me I'm Hungry.txt is full 'path' basePath is C://My Documents Thus returns 'Help Me I'm Hungry.txt'
static void Copy (string source, string destination, bool cloud, bool overwrite=true)
static void CopyExtended (string source, string destination, bool cloud, bool overwriteAlways, bool overwriteOld=true)
static void CopyFolder (string sourcePath, string destinationPath)
static void CopyFolderEXT (string sourcePath, string destinationPath, bool isCloud=false, Regex excludeFilter=null, bool overwriteAlways=false, bool overwriteOld=false)
static bool CopyToLocal (string cloudPath, string localPath)
static void Delete (string path, bool cloud, bool forceDeleteFile=false)
static bool Exists (string path, bool cloud)
static string string int stabilityLevel[] GetAlternateSavePathFiles (string folderName)
static string GetFileName (string path, bool includeExtension=true)
static int GetFileSize (string path, bool cloud)
static string GetFullPath (string path, bool cloud)
static string GetParentFolderPath (string path, bool includeExtension=true)
static void Move (string source, string destination, bool cloud, bool overwrite=true, bool forceDeleteSourceFile=false)
static bool MoveToCloud (string localPath, string cloudPath)
static bool MoveToLocal (string cloudPath, string localPath)
static void ProtectedInvoke (Action action)
static void Read (string path, byte[] buffer, int length, bool cloud)
static byte[] ReadAllBytes (string path, bool cloud)
static void RemoveReadOnlyAttribute (string path)
static void Write (string path, byte[] data, int length, bool cloud)
static void WriteAllBytes (string path, byte[] data, bool cloud)

Static Public Attributes

static string string message
static string path