Commands: GetDirectoriesAsync

The GetDirectoriesAsync method is designated to retrieve the paths of subdirectories of a specified directory.


Task<string[]> GetDirectoriesAsync(string from = null, int start = 0, int pageSize = 1024);
from string The directory path (default: null means the root directory)
start int The number of results that should be skipped (for paging purposes)
pageSize int The max number of results to get

Return Value
Task<string[]> A task that represents the asynchronous operation. The task result is the array of subdirectory paths.


await store.AsyncFilesCommands.UploadAsync("text-files/txt/a.txt", content);
await store.AsyncFilesCommands.UploadAsync("text-files/doc/a.doc", content);
await store.AsyncFilesCommands.UploadAsync("text-files/doc/drafts/a.doc", content);
await store.AsyncFilesCommands.UploadAsync("image-files/a.jpg", content);

string[] dirs;

dirs = await store.AsyncFilesCommands.GetDirectoriesAsync(); // will return "/image-files" and "/text-files"

dirs = await store.AsyncFilesCommands.GetDirectoriesAsync("/text-files"); // will return "/text-files/doc" and "/text-files/txt"

dirs = await store.AsyncFilesCommands.GetDirectoriesAsync("/image-files"); // will return empty array