Partager via


IWorkspace.GetFilesAsync(String, Boolean, CancellationToken) Method

Definition

Gets a set of files within the workspace.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>> GetFilesAsync (string subPath, bool recursive, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFilesAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>>
Public Function GetFilesAsync (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 files. 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