using System.IO; using JD.Core.ProjectManaging; namespace JD.Core { /// /// Allows to manipulate the root folder value. /// public static class DataRoot { #region Properties /// /// Gets the name of the data root directory for UAF. /// public static string Value => DataPath.Value; /// /// The world folder in the data root. /// public static string World => Path.Combine(Value, "World"); /// /// Returns a relative path from an absolute filename in data. /// public static bool ExtractRelativePath(string fileName, out string relative) { return DataPath.ExtractRelativePath(fileName, out relative); } /// /// Appends the data root to a relative filename. /// public static string ToAbsolutePath(string fileName) { return DataPath.GetAbsolutePath(fileName); } /// /// Get the relative path of an absolute path /// public static string ToRelativePath(string absolutePath) { return DataPath.GetRelativePath(absolutePath); } #endregion } }