LANCommander/LANCommander.Server.Services/Helpers/DirectoryHelpers.cs

17 lines
447 B
C#

namespace LANCommander.Helpers
{
public static class DirectoryHelpers
{
public static void DeleteIfExists(string path, bool recursive = true)
{
if (Directory.Exists(path))
Directory.Delete(path, recursive);
}
public static void CreateIfMissing(string path)
{
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
}
}
}