LANCommander/LANCommander.Server/Helpers/DirectoryHelpers.cs
2024-08-04 18:44:33 -05:00

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);
}
}
}