JobOutputStorage.SaveAsync Method

Definition

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)

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 = null);
member this.SaveAsync : Microsoft.Azure.Batch.Conventions.Files.JobOutputKind * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

kind
JobOutputKind

A JobOutputKind representing the category under which to store this file, for example JobOutput or JobPreview.

relativePath
System.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
System.Threading.CancellationToken

A System.Threading.CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task that represents the asynchronous operation.

Exceptions

System.ArgumentNullException

The kind or relativePath argument is null.

System.ArgumentException

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)

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 = null);
member this.SaveAsync : Microsoft.Azure.Batch.Conventions.Files.JobOutputKind * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parameters

kind
JobOutputKind

A JobOutputKind representing the category under which to store this file, for example JobOutput or JobPreview.

sourcePath
System.String

The path of the file to save.

destinationRelativePath
System.String

The blob name under which to save the file. This may include a relative component, such as "pointclouds/pointcloud_0001.txt".

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

System.Threading.Tasks.Task

A System.Threading.Tasks.Task that represents the asynchronous operation.

Exceptions

System.ArgumentNullException

The kind, sourcePath, or destinationRelativePath argument is null.

System.ArgumentException

The sourcePath or destinationRelativePath argument is empty.

Applies to