IFileSystemProvider.EnumerateDirectoriesAsync Method

Definition

Enumerates the child directories of a directory.

public:
 System::Collections::Generic::IAsyncEnumerable<Microsoft::VisualStudio::RpcContracts::FileSystem::DirectoryInfo ^> ^ EnumerateDirectoriesAsync(Uri ^ uri, System::String ^ searchPattern, System::IO::SearchOption searchOption, System::Threading::CancellationToken cancellationToken);
public System.Collections.Generic.IAsyncEnumerable<Microsoft.VisualStudio.RpcContracts.FileSystem.DirectoryInfo> EnumerateDirectoriesAsync (Uri uri, string searchPattern, System.IO.SearchOption searchOption, System.Threading.CancellationToken cancellationToken);
abstract member EnumerateDirectoriesAsync : Uri * string * System.IO.SearchOption * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.VisualStudio.RpcContracts.FileSystem.DirectoryInfo>
Public Function EnumerateDirectoriesAsync (uri As Uri, searchPattern As String, searchOption As SearchOption, cancellationToken As CancellationToken) As IAsyncEnumerable(Of DirectoryInfo)

Parameters

uri
Uri

The URI of the directory to read.

searchPattern
String

The search string to match against the names of child directories. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.

searchOption
SearchOption

Specifies whether to search only the directory specified by uri, or directory specified by uri and all of its subdirectories.

cancellationToken
CancellationToken

The cancellation token.

Returns

A collection of DirectoryInfo instances.

Exceptions

uri is null.

The directory specified by uri does not exist.

The caller does not have the required permission.

Applies to