Skip to content

Commit

Permalink
Add GetFilesAsync and GetDirectoriesAsync methods
Browse files Browse the repository at this point in the history
  • Loading branch information
grigoriy-yashin committed Oct 15, 2024
1 parent ae543e8 commit 893415e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Sources/EasyExtensions.WebDav/WebDavCloudClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using EasyExtensions.WebDav.Extensions;

namespace EasyExtensions.WebDav
{
Expand Down Expand Up @@ -173,6 +174,28 @@ public async Task<IEnumerable<WebDavResource>> GetResourcesAsync(string folder)
return result.Resources;
}

/// <summary>
/// Lists all files in a folder on the WebDAV server.
/// </summary>
/// <param name="folder"> The folder name. </param>
/// <returns> The list of resources - files only. </returns>
public async Task<IEnumerable<WebDavResource>> GetFilesAsync(string folder)
{
var resources = await GetFilesAsync(folder);
return resources;
}

/// <summary>
/// Lists all directories in a folder on the WebDAV server.
/// </summary>
/// <param name="folder"> The folder name. </param>
/// <returns> The list of resources - directories only. </returns>
public async Task<IEnumerable<WebDavResource>> GetDirectoriesAsync(string folder)
{
var resources = await GetDirectoriesAsync(folder);
return resources;
}

/// <summary>
/// Loads a file from the WebDAV server.
/// </summary>
Expand Down

0 comments on commit 893415e

Please sign in to comment.