共用方式為


JobOperations.CopyNodeFileContentToStream Method

Definition

Copies the contents of a file from the specified task's directory on its compute node to the given Stream.

public void CopyNodeFileContentToStream (string jobId, string taskId, string filePath, System.IO.Stream stream, Microsoft.Azure.Batch.GetFileRequestByteRange byteRange = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default);
member this.CopyNodeFileContentToStream : string * string * string * System.IO.Stream * Microsoft.Azure.Batch.GetFileRequestByteRange * seq<Microsoft.Azure.Batch.BatchClientBehavior> -> unit
Public Sub CopyNodeFileContentToStream (jobId As String, taskId As String, filePath As String, stream As Stream, Optional byteRange As GetFileRequestByteRange = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing)

Parameters

jobId
String

The id of the job containing the task.

taskId
String

The id of the task.

filePath
String

The path of the file to retrieve.

stream
Stream

The stream to copy the file contents to.

byteRange
GetFileRequestByteRange

A byte range defining what section of the file to copy. If omitted, the entire file is downloaded.

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

Remarks

This is a blocking operation. For a non-blocking equivalent, see CopyNodeFileContentToStreamAsync(String, String, String, Stream, GetFileRequestByteRange, IEnumerable<BatchClientBehavior>, CancellationToken).

Applies to