Share via


PoolOperations.CopyNodeFileContentToStringAsync Method

Definition

Reads the contents of a file from the specified node into a string.

public System.Threading.Tasks.Task<string> CopyNodeFileContentToStringAsync (string poolId, string computeNodeId, string filePath, System.Text.Encoding encoding = default, Microsoft.Azure.Batch.GetFileRequestByteRange byteRange = default, System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default, System.Threading.CancellationToken cancellationToken = default);
member this.CopyNodeFileContentToStringAsync : string * string * string * System.Text.Encoding * Microsoft.Azure.Batch.GetFileRequestByteRange * seq<Microsoft.Azure.Batch.BatchClientBehavior> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function CopyNodeFileContentToStringAsync (poolId As String, computeNodeId As String, filePath As String, Optional encoding As Encoding = Nothing, Optional byteRange As GetFileRequestByteRange = Nothing, Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Parameters

poolId
String

The id of the pool that contains the compute node.

computeNodeId
String

The id of the compute node.

filePath
String

The path of the file to retrieve.

encoding
Encoding

The encoding to use. If no value or null is specified, UTF8 is used.

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.

cancellationToken
CancellationToken

A CancellationToken for controlling the lifetime of the asynchronous operation.

Returns

The contents of the file, as a string

Applies to