-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathIAzureDataLakeStorage.cs
53 lines (46 loc) · 2 KB
/
IAzureDataLakeStorage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using FluentStorage.Azure.Blobs.Gen2.Model;
namespace FluentStorage.Azure.Blobs {
/// <summary>
/// Additional Gen 2 storage operations
/// </summary>
public interface IAzureDataLakeStorage : IAzureBlobStorage {
/// <summary>
/// Lists filesystems using Data Lake native REST API
/// </summary>
/// <returns></returns>
Task<IReadOnlyCollection<Filesystem>> ListFilesystemsAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Creates a filesystem
/// </summary>
/// <param name="filesystemName"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task CreateFilesystemAsync(string filesystemName, CancellationToken cancellationToken = default);
/// <summary>
/// Deletes a filesystem
/// </summary>
/// <param name="filesystem"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task DeleteFilesystemAsync(string filesystem, CancellationToken cancellationToken = default);
/// <summary>
/// Sets permissions on an object
/// </summary>
/// <param name="fullPath"></param>
/// <param name="accessControl">Access control rules. A good idea whould be to retreive them using <see cref="GetAccessControlAsync(string, bool, CancellationToken)"/>, modify, and send back via this method.</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task SetAccessControlAsync(string fullPath, AccessControl accessControl, CancellationToken cancellationToken = default);
/// <summary>
/// Gets permissions from an object
/// </summary>
/// <param name="fullPath"></param>
/// <param name="getUpn">When true, the call will return UPNs instead of object IDs when querying for permissions</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<AccessControl> GetAccessControlAsync(string fullPath, bool getUpn = false, CancellationToken cancellationToken = default);
}
}