KuduClientVFSExtensions.

VFSUploadStream(IKuduClient, Stream, FilePath) Method

Summary

Uploads stream to remote path.

Syntax

public static void VFSUploadStream(this IKuduClient client, Stream sourceStream, FilePath remotePath)

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";

 FilePath localFilePath = "./hello.txt";

 using(Stream sourceStream = kuduClient.FileSystem.GetFile(localFilePath).OpenRead())
 {
     kuduClient.VFSUploadStream(sourceStream, remoteFilePath);
 }

Parameters

Name Type Description
client IKuduClient The Kudu client.
sourceStream Stream The source stream.
remotePath FilePath The remote target file path.

Return Value

Type Description
void