Add Cargo Service & Controller
This commit is contained in:
parent
f3ce62b551
commit
bcc15de82b
8 changed files with 114 additions and 50 deletions
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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue