Skip to content

Commit

Permalink
Renamed async method
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Oct 11, 2023
1 parent 791dea0 commit 63c2ddd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Foundatio.Storage.SshNet/Storage/SshNetFileStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ public async Task<int> DeleteFilesAsync(string searchPattern = null, Cancellatio
EnsureClientConnected();

if (searchPattern == null)
return await DeleteDirectory(_client.WorkingDirectory, false, cancellationToken);
return await DeleteDirectoryAsync(_client.WorkingDirectory, false, cancellationToken);

if (searchPattern.EndsWith("/*"))
return await DeleteDirectory(searchPattern[..^2], false, cancellationToken);
return await DeleteDirectoryAsync(searchPattern[..^2], false, cancellationToken);

var files = await GetFileListAsync(searchPattern, cancellationToken: cancellationToken).AnyContext();
int count = 0;
Expand Down Expand Up @@ -235,7 +235,7 @@ private void CreateDirectory(string path) {
}
}

private async Task<int> DeleteDirectory(string path, bool includeSelf, CancellationToken cancellationToken = default) {
private async Task<int> DeleteDirectoryAsync(string path, bool includeSelf, CancellationToken cancellationToken = default) {
int count = 0;

string directory = NormalizePath(path);
Expand All @@ -246,7 +246,7 @@ private async Task<int> DeleteDirectory(string path, bool includeSelf, Cancellat
continue;

if (file.IsDirectory) {
count += await DeleteDirectory(file.FullName, true);
count += await DeleteDirectoryAsync(file.FullName, true, cancellationToken);
} else {
_logger.LogTrace("Deleting file {Path}", file.FullName);
await _client.DeleteFileAsync(file.FullName, cancellationToken).AnyContext();
Expand Down

0 comments on commit 63c2ddd

Please sign in to comment.