You are currently browsing legacy 3.5 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

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);
re.AsyncFilesCommands.UploadAsync("text-files/doc/a.doc", content);
re.AsyncFilesCommands.UploadAsync("text-files/doc/drafts/a.doc", content);
re.AsyncFilesCommands.UploadAsync("image-files/a.jpg", content);


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

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

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