using System.Text; namespace OpenHarbor.Storage.Abstractions; public interface IStorageProvider { Task> GetListAsync(string path, CancellationToken cancellationToken); Task> GetDirectoriesAsync(string path, CancellationToken cancellationToken); Task> GetFilesAsync(string path, string? pattern = null, SearchOption searchOption = SearchOption.TopDirectoryOnly, CancellationToken cancellationToken = default); Task WriteFileAsync(string sourcePath, string path, bool overrideIfExists = true, CancellationToken cancellationToken = default); Task WriteFileAsync(byte[] bytes, string path, bool overrideIfExists = true, CancellationToken cancellationToken = default); Task WriteFileAsync(Stream stream, string path, bool overrideIfExists = true, CancellationToken cancellationToken = default); Task WriteFileAsync(string sourcePath, string path, IWriteFileOptions options, CancellationToken cancellationToken); Task WriteFileAsync(byte[] bytes, string path, IWriteFileOptions options, CancellationToken cancellationToken); Task WriteFileAsync(Stream stream, string path, IWriteFileOptions options, CancellationToken cancellationToken); Task GetFileStreamAsync(string path, CancellationToken cancellationToken); Task GetFileBytesAsync(string path, CancellationToken cancellationToken); Task GetFileContentAsync(string path, Encoding encoding, CancellationToken cancellationToken); Task FileExistsAsync(string path, CancellationToken cancellationToken); Task DeleteFileAsync(string path, CancellationToken cancellationToken); Task DeleteDirectoryAsync(string path, bool force = false, CancellationToken cancellationToken = default); Task CreateDirectoryAsync(string path, CancellationToken cancellationToken); bool IsFileNameAllowed(string fileName); string SanitizeFileName(string key, string replacement); }