Updating
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace LCU.Api.Internal.FileOperations.Services
|
||||
{
|
||||
public class DirectFileService : IDirectFileService
|
||||
{
|
||||
public byte[] GetFileBytes(string path)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(path) && File.Exists(path))
|
||||
{
|
||||
return File.ReadAllBytes(path);
|
||||
}
|
||||
|
||||
throw new ArgumentException($"Path {path} must exist.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user