Add EnsureFileExists to IoHelpers
MODIFY
WalletWasabi/Helpers/IoHelpers.cs
WalletWasabi/Helpers/IoHelpers.cs
@@ -89,6 +89,16 @@ namespace System.IO
}
}
+ public static void EnsureFileExists(string filePath)
+ {
+ if (!File.Exists(filePath))
+ {
+ EnsureContainingDirectoryExists(filePath);
+
+ File.Create(filePath).Dispose();
+ }
+ }
+
public static byte[] GetHashFile(string filePath)
{
var bytes = File.ReadAllBytes(filePath);

Add EnsureFileExists to IoHelpers