Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions NUnit HTML Report Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,27 @@ private static bool CheckInputAndOutputFile(string input, string output)
Console.WriteLine("File does not exist");
}

if (ok)
{
CreateFolder(output);
}

return ok;
}

/// <summary>
/// Creates the folder of a file path if it doesn't exist
/// </summary>
/// <param name="filePath">The path to the file</param>
private static void CreateFolder(string folderPath)
{
string fullPath = Path.GetFullPath(folderPath);
if (!Directory.Exists(folderPath))
{
Directory.CreateDirectory(folderPath);
}
}

#endregion

#region Processing
Expand Down