KuduClientZipExtensions.

ZipUploadFile(IKuduClient, FilePath, DirectoryPath) Method

Summary

Uploads zip file to expand into remote directory path.

Syntax

public static void ZipUploadFile(this IKuduClient client, FilePath localPath, 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 sourceDirectoryPath = "./Documentation/";
 DirectoryPath remoteDirectoryPath = "/site/wwwroot/docs/";
 FilePath zipFilePath = "./Documentation.zip";

 Zip(sourceDirectoryPath, zipFilePath);

 kuduClient.ZipUploadFile(
    zipFilePath,
    remoteDirectoryPath);

Parameters

Name Type Description
client IKuduClient The Kudu client.
localPath FilePath The local source file path.
remotePath DirectoryPath The remote target directory path.

Return Value

Type Description
void