AgentFileStore.ListChildrenAsync(String, CancellationToken) Method

Definition

Lists the direct children (files and subdirectories) of a directory.

public abstract System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.FileStoreEntry>> ListChildrenAsync(string directory, System.Threading.CancellationToken cancellationToken = default);
abstract member ListChildrenAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.Agents.AI.FileStoreEntry>>
Public MustOverride Function ListChildrenAsync (directory As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of FileStoreEntry))

Parameters

directory
String

The relative path of the directory to list. Use an empty string for the root.

cancellationToken
CancellationToken

A token to cancel the operation.

Returns

A list of the direct children of the specified directory as FileStoreEntry instances. Subdirectories are listed before files.

Applies to