Files
ADOFAIRenderer/Util/FileUtil.cs
T
2026-10-15 16:17:13 +09:00

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