forked from managedcode/Storage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIGoogleDriveClient.cs
More file actions
24 lines (16 loc) · 1.15 KB
/
IGoogleDriveClient.cs
File metadata and controls
24 lines (16 loc) · 1.15 KB
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 DriveFile = Google.Apis.Drive.v3.Data.File;
namespace ManagedCode.Storage.GoogleDrive.Clients;
public interface IGoogleDriveClient
{
Task EnsureRootAsync(string rootFolderId, bool createIfNotExists, CancellationToken cancellationToken);
Task<DriveFile> UploadAsync(string rootFolderId, string path, Stream content, string? contentType, bool supportsAllDrives, CancellationToken cancellationToken);
Task<Stream> DownloadAsync(string rootFolderId, string path, bool supportsAllDrives, CancellationToken cancellationToken);
Task<bool> DeleteAsync(string rootFolderId, string path, bool supportsAllDrives, CancellationToken cancellationToken);
Task<bool> ExistsAsync(string rootFolderId, string path, bool supportsAllDrives, CancellationToken cancellationToken);
Task<DriveFile?> GetMetadataAsync(string rootFolderId, string path, bool supportsAllDrives, CancellationToken cancellationToken);
IAsyncEnumerable<DriveFile> ListAsync(string rootFolderId, string? directory, bool supportsAllDrives, CancellationToken cancellationToken);
}