feat: Create directory hierarchy if not exists

pull/1068/head
Daniel Destouche 2023-12-19 00:01:34 -05:00
parent 6cf303c1d3
commit 9a6ce2ce44
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ namespace WinSW.Util
{ {
public static void MoveOrReplaceFile(string sourceFileName, string destFileName) public static void MoveOrReplaceFile(string sourceFileName, string destFileName)
{ {
new FileInfo(destFileName).Directory?.Create();
#if NET #if NET
File.Move(sourceFileName, destFileName, true); File.Move(sourceFileName, destFileName, true);
#else #else