JobOutputStorage.SaveAsync 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.
Overloads
SaveAsync(JobOutputKind, String, CancellationToken) |
Saves the specified file to persistent storage. |
SaveAsync(JobOutputKind, String, String, CancellationToken) |
Saves the specified file to persistent storage. |
SaveAsync(JobOutputKind, String, CancellationToken)
- Source:
- JobOutputStorage.cs
Saves the specified file to persistent storage.
public System.Threading.Tasks.Task SaveAsync (Microsoft.Azure.Batch.Conventions.Files.JobOutputKind kind, string relativePath, System.Threading.CancellationToken cancellationToken = default);
member this.SaveAsync : Microsoft.Azure.Batch.Conventions.Files.JobOutputKind * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SaveAsync (kind As JobOutputKind, relativePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- kind
- JobOutputKind
A JobOutputKind representing the category under which to store this file, for example JobOutput or JobPreview.
- relativePath
- String
The path of the file to save, relative to the current directory. If the file is in a subdirectory of the current directory, the relative path will be preserved in blob storage.
- cancellationToken
- CancellationToken
A CancellationToken for controlling the lifetime of the asynchronous operation.
Returns
A Task that represents the asynchronous operation.
Exceptions
The kind
or relativePath
argument is null.
The relativePath
argument is an absolute path, or is empty.
Remarks
If the file is outside the current directory, traversals up the directory tree are removed. For example, a relativePath
of "..\ProcessEnv.cmd" would be treated as "ProcessEnv.cmd" for the purposes of creating a blob name.
Applies to
SaveAsync(JobOutputKind, String, String, CancellationToken)
- Source:
- JobOutputStorage.cs
Saves the specified file to persistent storage.
public System.Threading.Tasks.Task SaveAsync (Microsoft.Azure.Batch.Conventions.Files.JobOutputKind kind, string sourcePath, string destinationRelativePath, System.Threading.CancellationToken cancellationToken = default);
member this.SaveAsync : Microsoft.Azure.Batch.Conventions.Files.JobOutputKind * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SaveAsync (kind As JobOutputKind, sourcePath As String, destinationRelativePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- kind
- JobOutputKind
A JobOutputKind representing the category under which to store this file, for example JobOutput or JobPreview.
- sourcePath
- String
The path of the file to save.
- destinationRelativePath
- String
The blob name under which to save the file. This may include a relative component, such as "pointclouds/pointcloud_0001.txt".
- cancellationToken
- CancellationToken
A CancellationToken for controlling the lifetime of the asynchronous operation.
Returns
A Task that represents the asynchronous operation.
Exceptions
The kind
, sourcePath
, or destinationRelativePath
argument is null.
The sourcePath
or destinationRelativePath
argument is empty.
Applies to
Azure SDK for .NET