This commit is contained in:
parent
7f01a92677
commit
dc89d32164
1 changed files with 9 additions and 1 deletions
|
@ -31,9 +31,17 @@ public static class Util
|
||||||
|
|
||||||
public static void CheckDir(string path)
|
public static void CheckDir(string path)
|
||||||
{
|
{
|
||||||
|
Console.Info("Checking directory: " + path);
|
||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(path))
|
||||||
|
{
|
||||||
|
Console.Error("Directory " + path + " wasn't found, creating now.");
|
||||||
Directory.CreateDirectory(path);
|
Directory.CreateDirectory(path);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.Success("Directory was found: " + path);
|
||||||
|
}
|
||||||
|
}
|
||||||
public static string FormatFileSize(long bytes)
|
public static string FormatFileSize(long bytes)
|
||||||
{
|
{
|
||||||
string[] sizes = { "B", "KB", "MB", "GB", "TB" };
|
string[] sizes = { "B", "KB", "MB", "GB", "TB" };
|
||||||
|
|
Loading…
Add table
Reference in a new issue