Compartir a través de


IWorkspace.GetDirectoriesAsync(String, Boolean, CancellationToken) Method

Definition

Gets a set of directories within the workspace.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>> GetDirectoriesAsync (string subPath, bool recursive, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDirectoriesAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>>
Public Function GetDirectoriesAsync (subPath As String, recursive As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyCollection(Of String))

Parameters

subPath
String

The folder within the workspace that should be searched for directories. May be absolute, or relative to the Location. An empty path is interpreted as the workspace root.

recursive
Boolean

true to return files in subPath and its sub-folders; false to return only files found in the immediate folder.

cancellationToken
CancellationToken

A token that cancels the query.

Returns

A task whose result is the set of files found.

Applies to