AgentFileStore.ReadAsync(String, CancellationToken) Method

Definition

Reads the content of a file.

public abstract System.Threading.Tasks.Task<string?> ReadAsync(string path, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public MustOverride Function ReadAsync (path As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

path
String

The relative path of the file to read.

cancellationToken
CancellationToken

A token to cancel the operation.

Returns

The file content, or null if the file does not exist.

Applies to