DD.WellWorkover.Cloud/AsbCloudApp/Services/IFileStorageRepository.cs

52 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
/// <summary>
/// Репозиторий хранения фалов
/// </summary>
public interface IFileStorageRepository
{
/// <summary>
/// Директория хранения файлов
/// </summary>
string RootPath { get; }
/// <summary>
/// Получение длинны фала и проверка его наличия, если отсутствует падает исключение
/// </summary>
/// <param name="srcFilePath"></param>
/// <returns></returns>
long GetLengthFile(string srcFilePath);
/// <summary>
/// Перемещение файла
/// </summary>
/// <param name="srcFilePath"></param>
/// <param name="filePath"></param>
void MoveFile (string srcFilePath, string filePath);
/// <summary>
/// Копирование файла
/// </summary>
/// <returns></returns>
Task CopyFileAsync(string filePath, Stream fileStream, CancellationToken token);
/// <summary>
/// Удаление файла
/// </summary>
/// <param name="fileName"></param>
void DeleteFile(string fileName);
/// <summary>
/// Проверка наличия файла
/// </summary>
/// <param name="fullPath"></param>
/// <param name="fileName"></param>
/// <returns></returns>
bool FileExists(string fullPath, string fileName);
}
}