AgentSessionFiles.GetSessionFilesAsync Method

Definition

[Protocol Method] List files and directories at a given path in the session sandbox. Returns only the immediate children of the specified directory (non-recursive).

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.SessionDirectoryListResponse>> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSessionFilesAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.SessionDirectoryListResponse>>
override this.GetSessionFilesAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<Azure.AI.Projects.Agents.SessionDirectoryListResponse>>
Public Overridable Function GetSessionFilesAsync (agentName As String, sessionId As String, sessionStoragePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of SessionDirectoryListResponse))

Parameters

agentName
String

The name of the agent.

sessionId
String

The session ID.

sessionStoragePath
String

The directory path to list, relative to the session home directory.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

The response returned from the service.

Exceptions

agentName, sessionId or sessionStoragePath is null.

agentName, sessionId or sessionStoragePath is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to