pulsar/Pulsar/Utils/FileHelper.cs

21 lines
No EOL
357 B
C#

namespace Pulsar.Utils;
public static class FileHelper
{
public static bool ValidateFile(string filePath)
{
if (!File.Exists(filePath))
{
return false;
}
var fileInfo = new FileInfo(filePath);
if (fileInfo.Length == 0)
{
return false;
}
return true;
}
}