/// <summary> /// Creates the directory path by combining the environement directory variable and the relative path. /// </summary> /// <param name="directory">Environement directory.</param> /// <param name="path">Relative path.</param> public static string CreateEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory, string path) { var combined = Path.Combine(GetEnvironmentDirectoryPath(directory), path); if (!Directory.Exists(combined)) { Directory.CreateDirectory(combined); } return(combined); }
/// <summary> /// Returns the absolute path of the supplied environment directory. /// </summary> /// <param name="directory"></param> /// <returns></returns> public static string GetEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory) { switch (directory) { case TabsterEnvironmentDirectory.ApplicatonData: return(ApplicationDataDirectory); case TabsterEnvironmentDirectory.UserData: return(UserDataDirectory); } return(null); }
/// <summary> /// Creates the directory path by combining the environement directory variable and the relative path. /// </summary> /// <param name="directory">Environement directory.</param> /// <param name="path">Relative path.</param> public static string CreateEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory, string path) { var combined = Path.Combine(GetEnvironmentDirectoryPath(directory), path); if (!Directory.Exists(combined)) Directory.CreateDirectory(combined); return combined; }
/// <summary> /// Returns the absolute path of the supplied environment directory. /// </summary> /// <param name="directory"></param> /// <returns></returns> public static string GetEnvironmentDirectoryPath(TabsterEnvironmentDirectory directory) { switch (directory) { case TabsterEnvironmentDirectory.ApplicatonData: return ApplicationDataDirectory; case TabsterEnvironmentDirectory.UserData: return UserDataDirectory; } return null; }