SHA256
18 lines
702 B
C#
18 lines
702 B
C#
using System.IO;
|
|
|
|
namespace ADOFAIRenderer.Util;
|
|
|
|
/// <summary>File system helpers.</summary>
|
|
internal static class FileUtil
|
|
{
|
|
/// <summary>
|
|
/// Creates <paramref name="path"/> and its missing parent directories when it does not exist.
|
|
/// Exceptions of Directory.CreateDirectory are not caught (for example ArgumentException for an empty path,
|
|
/// IOException or UnauthorizedAccessException when the directory cannot be created).
|
|
/// </summary>
|
|
/// <param name="path">Directory path, absolute or relative to the current directory.</param>
|
|
public static void CreateDirectory(string path)
|
|
{
|
|
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
|
}
|
|
} |