public override async Task UpdateSecurityAsync(IStorageSecurity security, IProgress progress = null, CancellationToken cancellationToken = default(CancellationToken)) { try { if (null != progress) { progress.Total = 1; progress.Value = 0; } GoogleObject = await StorageRoot.UpdateObjectAclAsync(GoogleObject, StorageRoot.CreateObjectAccessControlList(security).ToList(), cancellationToken); _security = security; } finally { if (null != progress) { progress.Value = 1; } } }
public StoragePath(StorageRoot storageRoot, string localPath) { StorageRoot = storageRoot ?? throw new ArgumentNullException(nameof(storageRoot)); LocalPath = localPath ?? throw new ArgumentNullException(nameof(localPath)); }
public Task UpdateContentAsync(Stream contents, string contentType, IProgress progress, CancellationToken cancellationToken) { return(StorageRoot.UpdateContentAsync(this, contents, contentType, progress, cancellationToken)); }
public Task <Stream> CreateReadableStreamAsync(CancellationToken cancellationToken) { return(StorageRoot.CreateReadableStreamAsync(this, cancellationToken)); }
public Task <StorageRecord> RenameAsync(string name, IProgress progress, CancellationToken cancellationToken) { return(StorageRoot.RenameAsync(this, name, progress, cancellationToken)); }
public virtual Task DeleteAsync(IProgress progress, CancellationToken cancellationToken) { return(StorageRoot.DeleteRecursiveAsync(this, progress, cancellationToken)); }
public StorageRecord(StorageRoot storageRoot, string localPath, GoogleObject googleObject) : base(storageRoot, localPath) { GoogleObject = googleObject ?? throw new System.ArgumentNullException(nameof(googleObject)); _security = storageRoot.GetPermissions(GoogleObject); }
public StorageItem(StorageRoot storageRoot, string localPath) : base(storageRoot, localPath) { }
public IAsyncEnumerable <StorageItem> GetContentsAsync() => DelayedAsyncEnumerable.Delay(cancellationToken => StorageRoot.GetContentsAsync(LocalPath, cancellationToken));
public Task <StorageRecord> CreateRecordAsync(string name, Stream contents, string contentType = null, IProgress progress = null, CancellationToken cancellationToken = default(CancellationToken)) => StorageRoot.CreateRecordAsync($"{LocalPath}/{name}", contents, contentType, progress, cancellationToken);
public Task <StorageFolder> CreateFolderAsync(string name, IProgress progress = null, CancellationToken cancellationToken = default(CancellationToken)) => StorageRoot.CreateFolderAsync($"{LocalPath}/{name}", progress, cancellationToken);
public StorageFolder(StorageRoot storageRoot, string localPath) : base(storageRoot, localPath) { }