Remove with Text
Remove GetEngineeringSpcReview Better error message EnforceCodeStyleInBuild NginxFileSystem Remove Reactors and Working Directory AppSettings Delete self contained Thunder Tests Back to .net8.0 api/v4/InfinityQS ApiExplorerSettings Wafer Counter
This commit is contained in:
36
Server/ApiControllers/FileShareController.cs
Normal file
36
Server/ApiControllers/FileShareController.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
|
||||
namespace OI.Metrology.Server.ApiControllers;
|
||||
|
||||
[Route("api/v1/file-share")]
|
||||
public class FileShareController : Controller, IFileShareController<IResult>
|
||||
{
|
||||
|
||||
private readonly IFileShareRepository _FileShareRepository;
|
||||
|
||||
public FileShareController(IFileShareRepository fileShareRepository) =>
|
||||
_FileShareRepository = fileShareRepository;
|
||||
|
||||
[HttpGet("copy-file")]
|
||||
public IResult CopyFile(string from, string to)
|
||||
{
|
||||
_FileShareRepository.CopyFile(from, to);
|
||||
return Results.Ok();
|
||||
}
|
||||
|
||||
[HttpGet("move-file")]
|
||||
public IResult MoveFile(string from, string to)
|
||||
{
|
||||
_FileShareRepository.CopyFile(from, to);
|
||||
return Results.Ok();
|
||||
}
|
||||
|
||||
[HttpGet("file-write")]
|
||||
public IResult FileWrite(string path, string contents)
|
||||
{
|
||||
_FileShareRepository.FileWrite(path, contents);
|
||||
return Results.Ok();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user