-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathIDropboxClientWrapper.cs
More file actions
24 lines (16 loc) · 1010 Bytes
/
IDropboxClientWrapper.cs
File metadata and controls
24 lines (16 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Dropbox.Api.Files;
namespace ManagedCode.Storage.Dropbox.Clients;
public interface IDropboxClientWrapper
{
Task EnsureRootAsync(string rootPath, bool createIfNotExists, CancellationToken cancellationToken);
Task<DropboxItemMetadata> UploadAsync(string rootPath, string path, Stream content, string? contentType, CancellationToken cancellationToken);
Task<Stream> DownloadAsync(string rootPath, string path, CancellationToken cancellationToken);
Task<bool> DeleteAsync(string rootPath, string path, CancellationToken cancellationToken);
Task<bool> ExistsAsync(string rootPath, string path, CancellationToken cancellationToken);
Task<DropboxItemMetadata?> GetMetadataAsync(string rootPath, string path, CancellationToken cancellationToken);
IAsyncEnumerable<DropboxItemMetadata> ListAsync(string rootPath, string? directory, CancellationToken cancellationToken);
}