Removed old rememberleavepos variable and added docs.

This commit is contained in:
Zack Piispanen 2012-06-01 13:12:56 -04:00
parent be45fb762b
commit 896a8272c9

View file

@ -22,36 +22,52 @@ namespace TShockAPI
{
public class FileTools
{
/// <summary>
/// Path to the file containing the rules.
/// </summary>
internal static string RulesPath
{
get { return Path.Combine(TShock.SavePath, "rules.txt"); }
}
/// <summary>
/// Path to the file containing the message of the day.
/// </summary>
internal static string MotdPath
{
get { return Path.Combine(TShock.SavePath, "motd.txt"); }
}
/// <summary>
/// Path to the file containing the whitelist.
/// </summary>
internal static string WhitelistPath
{
get { return Path.Combine(TShock.SavePath, "whitelist.txt"); }
}
internal static string RememberedPosPath
{
get { return Path.Combine(TShock.SavePath, "oldpos.xml"); }
}
/// <summary>
/// Path to the file containing the config.
/// </summary>
internal static string ConfigPath
{
get { return Path.Combine(TShock.SavePath, "config.json"); }
}
/// <summary>
/// Creates an empty file at the given path.
/// </summary>
/// <param name="file">The path to the file.</param>
public static void CreateFile(string file)
{
File.Create(file).Close();
}
/// <summary>
/// Creates a file if the files doesn't already exist.
/// </summary>
/// <param name="file">The path to the files</param>
/// <param name="data">The data to write to the file.</param>
public static void CreateIfNot(string file, string data = "")
{
if (!File.Exists(file))