IConnectedWorkspaceService.GetFilesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.