KuduClientZipExtensions.

ZipDownloadStream(IKuduClient, DirectoryPath) Method

Summary

Downloads remote directory as zip to stream.

Syntax

public static Stream ZipDownloadStream(this IKuduClient client, DirectoryPath 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);

 DirectoryPath remoteDirectoryPath = "/site/wwwroot/assets/";

 Stream resultStream = kuduClient.ZipDownloadStream(remoteDirectoryPath);

 Information("Result length: {0}", resultStream.Length);

Parameters

Name Type Description
client IKuduClient The Kudu client.
remotePath DirectoryPath The remote source path.

Return Value

Type Description
Stream Content as System.IO.Stream.