Пример #1
0
        private async Task DeleteAsync(string fullPath, CancellationToken cancellationToken)
        {
            DecomposePath(fullPath, out string fs, out string rp, false);

            if (StoragePath.IsRootPath(rp))
            {
                await _restApi.DeleteFilesystemAsync(fs).ConfigureAwait(false);
            }
            else
            {
                try
                {
                    await _restApi.DeletePathAsync(fs, rp, true).ConfigureAwait(false);
                }
                catch (ApiException ex) when(ex.StatusCode == HttpStatusCode.NotFound)
                {
                    // file not found, ignore
                }
            }
        }
Пример #2
0
 public Task DeleteFilesystemAsync(string filesystem)
 {
     return(_restApi.DeleteFilesystemAsync(filesystem));
 }