/// <summary> /// /// </summary> /// <param name="location"></param> /// <returns></returns> private static string BaseDirectoryPath(LinuxDataLocation location) { string path = ""; switch (location) { case LinuxDataLocation.GameFolder: path = Application.dataPath + "/"; break; case LinuxDataLocation.LocalApplicationData: path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/"; break; case LinuxDataLocation.Personal: path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/"; break; } return(path); }
/// <summary> /// /// </summary> /// <param name="location"></param> private void CheckDirectories(LinuxDataLocation location) { }
/// <summary> /// Get absolute path to Linux data location, including game name and child folder /// </summary> /// <param name="location">Location to find <seealso cref="LinuxDataLocation"/></param> /// <param name="GameFolderName">Name of the games folder</param> /// <param name="folder">Folder to find <seealso cref="Folders"/></param> /// <returns>Path to location</returns> public static string GetFolderPath(LinuxDataLocation location, string GameFolderName, Folders folder) { return(BaseDirectoryPath(location) + GameFolderName + "/" + folder.ToString() + "/"); }
/// <summary> /// Get absolute path to Linux data location /// </summary> /// <param name="location">Location to find <seealso cref="LinuxDataLocation"/></param> /// <returns>Path to location</returns> public static string GetDirectoryPath(LinuxDataLocation location) { return(BaseDirectoryPath(location)); }