Update FSUtils.cs

pull/1/head
Ogoun 5 years ago
parent 1e0b3bd664
commit 61163cf910

@ -31,7 +31,7 @@ namespace ZeroLevel.Services.FileSystem
return Path.Combine(folderName, fn); return Path.Combine(folderName, fn);
} }
public static string GetAppLocalDirectory(string folderName) public static string GetAppLocalTempDirectory(string folderName)
{ {
folderName = Path.Combine(Configuration.BaseDirectory, "temp", folderName); folderName = Path.Combine(Configuration.BaseDirectory, "temp", folderName);
if (false == Directory.Exists(folderName)) if (false == Directory.Exists(folderName))
@ -41,6 +41,16 @@ namespace ZeroLevel.Services.FileSystem
return folderName; return folderName;
} }
public static string GetAppLocalDbDirectory(string dbFolderName = null)
{
dbFolderName = Path.Combine(Configuration.BaseDirectory, dbFolderName ?? "db");
if (false == Directory.Exists(dbFolderName))
{
Directory.CreateDirectory(dbFolderName);
}
return dbFolderName;
}
#region FileName & Path correction #region FileName & Path correction
private static string _invalid_path_characters = new string(Path.GetInvalidPathChars()); private static string _invalid_path_characters = new string(Path.GetInvalidPathChars());

Loading…
Cancel
Save

Powered by TurnKey Linux.