IFilesService.GetFilesAsync(String, Boolean, CancellationToken) 方法

定义

从子路径获取文件

public:
 System::Threading::Tasks::Task<System::Collections::Generic::IReadOnlyCollection<System::String ^> ^> ^ GetFilesAsync(System::String ^ path, bool recursive, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>> GetFilesAsync (string path, bool recursive, System.Threading.CancellationToken cancellationToken);
abstract member GetFilesAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<string>>
Public Function GetFilesAsync (path As String, recursive As Boolean, cancellationToken As CancellationToken) As Task(Of IReadOnlyCollection(Of String))

参数

path
String

要查找文件的相对子路径

recursive
Boolean

如果需要递归

cancellationToken
CancellationToken

取消令牌

返回

Task<IReadOnlyCollection<String>>

根文件路径的集合

适用于