KuduClientVFSExtensions.

VFSDownloadString(IKuduClient, FilePath, Encoding) Method

Summary

Downloads remote file as string.

Syntax

public static string VFSDownloadString(this IKuduClient client, FilePath remotePath, Encoding encoding = null)

Examples

 #addin nuget:?package=Cake.Kudu.Client

 string  baseUri     = EnvironmentVariable("KUDU_CLIENT_BASEURI"),
         userName    = EnvironmentVariable("KUDU_CLIENT_USERNAME"),
         password    = EnvironmentVariable("KUDU_CLIENT_PASSWORD");

 IKuduClient kuduClient = KuduClient(
     baseUri,
     userName,
     password);

 FilePath remoteFilePath = "/site/wwwroot/hello.txt";

 string resultString = kuduClient.VFSDownloadString(remoteFilePath);

 Information("Result: {0}", resultString);

Parameters

Name Type Description
client IKuduClient The Kudu client.
remotePath FilePath The remote source path.
encoding Encoding The text encoding.

Return Value

Type Description
string Content as string.