replace v6 with experimental v7 code
This commit is contained in:
20
src/MpvNet/Help/FileHelp.cs
Normal file
20
src/MpvNet/Help/FileHelp.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
namespace MpvNet.Help;
|
||||
|
||||
public static class FileHelp
|
||||
{
|
||||
public static void Delete(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Terminal.WriteError("Failed to delete file:" + BR + path + BR + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadTextFile(string path) => File.Exists(path) ? File.ReadAllText(path) : "";
|
||||
}
|
||||
Reference in New Issue
Block a user