feat: add fnOS packaging, storage workflows and release pipeline
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using dy.net.model.dto;
|
||||
|
||||
namespace dy.net.storage
|
||||
{
|
||||
public interface IMediaStorage
|
||||
{
|
||||
StorageType StorageType { get; }
|
||||
Task EnsureDirectoryAsync(string path, CancellationToken cancellationToken = default);
|
||||
Task<bool> ExistsAsync(string path, CancellationToken cancellationToken = default);
|
||||
Task<long?> GetLengthAsync(string path, CancellationToken cancellationToken = default);
|
||||
Task WriteAsync(string path, Stream source, long? contentLength = null, string contentType = null, CancellationToken cancellationToken = default);
|
||||
Task<StorageReadResult> OpenReadAsync(string path, long? from = null, long? to = null, CancellationToken cancellationToken = default);
|
||||
Task DeleteAsync(string path, CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Optional capability for providers that expose a canonical path spelling different from
|
||||
/// the logical path requested by the application.
|
||||
/// </summary>
|
||||
public interface ICanonicalMediaStorage
|
||||
{
|
||||
Task<string> CanonicalizePathAsync(
|
||||
string path,
|
||||
bool createParentDirectories = false,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user