你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

PoolOperations.CopyNodeFileContentToStreamAsync 方法

定义

将文件的内容从指定的节点复制到给定 Stream的 。

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

参数

poolId
String

包含计算节点的池的 ID。

computeNodeId
String

计算节点的 ID。

filePath
String

要检索的文件的路径。

stream
Stream

要将文件内容复制到的流。

byteRange
GetFileRequestByteRange

定义要复制的文件部分的字节范围。 如果省略,则下载整个文件。

additionalBehaviors
IEnumerable<BatchClientBehavior>

在 之后应用于 Batch 服务请求的实例集合BatchClientBehaviorCustomBehaviors

cancellationToken
CancellationToken

一个 CancellationToken ,用于控制异步操作的生存期。

返回

注解

获取文件操作以异步方式运行。

适用于