FileOperationsExtensions.DeleteFromTaskAsync 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.
Deletes the specified Task file from the Compute Node where the Task ran.
public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskHeaders> DeleteFromTaskAsync (this Microsoft.Azure.Batch.Protocol.IFileOperations operations, string jobId, string taskId, string filePath, bool? recursive = default, Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskOptions fileDeleteFromTaskOptions = default, System.Threading.CancellationToken cancellationToken = default);
static member DeleteFromTaskAsync : Microsoft.Azure.Batch.Protocol.IFileOperations * string * string * string * Nullable<bool> * Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.FileDeleteFromTaskHeaders>
<Extension()>
Public Function DeleteFromTaskAsync (operations As IFileOperations, jobId As String, taskId As String, filePath As String, Optional recursive As Nullable(Of Boolean) = Nothing, Optional fileDeleteFromTaskOptions As FileDeleteFromTaskOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of FileDeleteFromTaskHeaders)
Parameters
- operations
- IFileOperations
The operations group for this extension method.
- jobId
- String
The ID of the Job that contains the Task.
- taskId
- String
The ID of the Task whose file you want to delete.
- filePath
- String
The path to the Task file or directory that you want to delete.
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.
- fileDeleteFromTaskOptions
- FileDeleteFromTaskOptions
Additional parameters for the operation
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Applies to
Azure SDK for .NET