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

PoolOperations.CopyNodeFileContentToString 方法

定义

将指定节点中的文件内容读入字符串。

public string CopyNodeFileContentToString (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);
member this.CopyNodeFileContentToString : string * string * string * System.Text.Encoding * Microsoft.Azure.Batch.GetFileRequestByteRange * seq<Microsoft.Azure.Batch.BatchClientBehavior> -> string
Public Function CopyNodeFileContentToString (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) As String

参数

poolId
String

包含计算节点的池的 ID。

computeNodeId
String

计算节点的 ID。

filePath
String

要检索的文件的路径。

encoding
Encoding

要使用的编码。 如果未指定值或 null,则使用 UTF8。

byteRange
GetFileRequestByteRange

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

additionalBehaviors
IEnumerable<BatchClientBehavior>

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

返回

文件的内容,以字符串形式表示

适用于