AgentSessionFiles.DeleteSessionFileAsync 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.
Delete a file or directory from the session sandbox.
If recursive is false (default) and the target is a non-empty directory, the API returns 409 Conflict.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteSessionFileAsync : string * string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.DeleteSessionFileAsync : string * string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function DeleteSessionFileAsync (agentName As String, sessionId As String, path As String, Optional recursive As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult)
Parameters
- agentName
- String
The name of the agent.
- sessionId
- String
The session ID.
- path
- String
The file or directory path to delete, relative to the session home directory.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
agentName, sessionId or path is null.
agentName, sessionId or path is an empty string, and was expected to be non-empty.
Service returned a non-success status code.