IConnectedWorkspaceService.GetFilesAsync Method

Definition

Gets a collection of files that exist in the given path.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>> GetFilesAsync (string relativePath, string filter = "*", System.Threading.CancellationToken cancellationToken = default);
abstract member GetFilesAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>>
Public Function GetFilesAsync (relativePath As String, Optional filter As String = "*", Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyCollection(Of String))

Parameters

relativePath
String

The relative path to the directory to search for files in.

filter
String

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

cancellationToken
CancellationToken

A cancellation token.

Returns

A read only collection of the full names (including paths) for the files in the directory specified by relativePath.

Applies to