Share via


IFileOperations.DeleteFromComputeNodeWithHttpMessagesAsync Method

Definition

Deletes the specified file from the Compute Node.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromComputeNodeHeaders>> DeleteFromComputeNodeWithHttpMessagesAsync (string poolId, string nodeId, string filePath, bool? recursive = default, Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromComputeNodeOptions fileDeleteFromComputeNodeOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeleteFromComputeNodeWithHttpMessagesAsync : string * string * string * Nullable<bool> * Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromComputeNodeOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromComputeNodeHeaders>>
Public Function DeleteFromComputeNodeWithHttpMessagesAsync (poolId As String, nodeId As String, filePath As String, Optional recursive As Nullable(Of Boolean) = Nothing, Optional fileDeleteFromComputeNodeOptions As FileDeleteFromComputeNodeOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationHeaderResponse(Of FileDeleteFromComputeNodeHeaders))

Parameters

poolId
String

The ID of the Pool that contains the Compute Node.

nodeId
String

The ID of the Compute Node from which you want to delete the file.

filePath
String

The path to the file or directory that you want to delete.

recursive
Nullable<Boolean>

Whether to delete children of a directory. If the filePath parameter represents a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail.

fileDeleteFromComputeNodeOptions
FileDeleteFromComputeNodeOptions

Additional parameters for the operation

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when a required parameter is null

Applies to