Add writefile for bytes

This commit is contained in:
Archangel
2025-02-20 13:36:56 +01:00
parent 5a5e18f568
commit 92c1f6502d
+10
View File
@@ -77,6 +77,16 @@ public class FileUtil(
File.WriteAllText(filePath, fileContent);
}
public void WriteFile(string filePath, byte[] fileContent)
{
if (!FileExists(filePath))
{
CreateFile(filePath);
}
File.WriteAllBytes(filePath, fileContent);
}
private void CreateFile(string filePath)
{
var stream = File.Create(filePath);