This commit is contained in:
CortexCore
2023-10-06 23:43:19 +08:00
parent ebf9c1f526
commit 2c4710bc5d
186 changed files with 111802 additions and 764 deletions

View File

@@ -18,7 +18,6 @@ namespace BITKit
[BITCommand]
public static void Set(string key, string value)
{
Data.Set(key, value);
if (Guid.TryParse(value, out var guidResult))
{
Data.Set(key, guidResult);
@@ -35,6 +34,10 @@ namespace BITKit
{
Data.Set(key, intResult);
}
else
{
Data.Set(key, value);
}
}
[BITCommand]
public static void SetContainer(string key, string typeName, string json)

View File

@@ -32,6 +32,12 @@ namespace BITKit
return GetPath(paths);
}
public static void EnsureDirectoryCreated(string path)
{
path = Path.GetDirectoryName(path);
if (Directory.Exists(path) is true) return;
if (path != null) Directory.CreateDirectory(path);
}
public static string GetFilePath(params string[] paths)
{