/// <summary> /// Get the relative path to a special folder for a platform /// </summary> /// <param name="ns">Game namespace</param> /// <param name="platform">Platform folder</param> /// <param name="folder">Platform's folder. Must only have one folder flag set.</param> /// <param name="overrides">Optional set of overrides to use. Can be null.</param> /// <returns>Relative path to the folder</returns> public static string GetRelativePath(Namespace ns, Platform platform, PlatformFolder folder, Overrides overrides) { string dir_path; if (overrides != null && overrides.GetOverride(folder, out dir_path)) { return(dir_path); } else { return(GetRelativePath(ns, platform, folder)); } }
/// <summary> /// Create or get the path to a special folder for a platform /// </summary> /// <param name="ns">Game namespace</param> /// <param name="platform">Platform folder</param> /// <param name="folder">Platform's folder. Must only have one folder flag set.</param> /// <param name="overrides">Optional set of overrides to use. Can be null.</param> /// <param name="create">True if we should create the path on disk if it doesn't exist already</param> /// <returns>Path to the folder</returns> public static string CreatePlatformFolder(Namespace ns, Platform platform, PlatformFolder folder, Overrides overrides, bool create) { string dir_path; if (overrides != null && overrides.GetOverride(folder, out dir_path)) { if (create && !Directory.Exists(dir_path)) { Directory.CreateDirectory(dir_path); } return(dir_path); } else { return(CreatePlatformFolder(ns, platform, folder)); } }
/// <summary> /// Create or get the path to a special folder for a platform /// </summary> /// <param name="ns">Game namespace</param> /// <param name="platform">Platform folder</param> /// <param name="folder">Platform's folder. Must only have one folder flag set.</param> /// <param name="overrides">Optional set of overrides to use. Can be null.</param> /// <param name="create">True if we should create the path on disk if it doesn't exist already</param> /// <returns>Path to the folder</returns> public static string CreatePlatformFolder(Namespace ns, Platform platform, PlatformFolder folder, Overrides overrides, bool create) { string dir_path; if (overrides != null && overrides.GetOverride(folder, out dir_path)) { if (create && !Directory.Exists(dir_path)) Directory.CreateDirectory(dir_path); return dir_path; } else return CreatePlatformFolder(ns, platform, folder); }
/// <summary> /// Get the relative path to a special folder for a platform /// </summary> /// <param name="ns">Game namespace</param> /// <param name="platform">Platform folder</param> /// <param name="folder">Platform's folder. Must only have one folder flag set.</param> /// <param name="overrides">Optional set of overrides to use. Can be null.</param> /// <returns>Relative path to the folder</returns> public static string GetRelativePath(Namespace ns, Platform platform, PlatformFolder folder, Overrides overrides) { string dir_path; if (overrides != null && overrides.GetOverride(folder, out dir_path)) return dir_path; else return GetRelativePath(ns, platform, folder); }