mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 16:33:43 -04:00
Add Cargo Service & Controller
This commit is contained in:
21
Pulsar/Utils/FileHelper.cs
Normal file
21
Pulsar/Utils/FileHelper.cs
Normal file
@ -0,0 +1,21 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user