This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Kudu.Client.
Summary
Uploads zip stream and extracts to remote directory path.
- Assembly
- Cake
.Kudu .Client .dll - Namespace
- Cake
.Kudu .Client .Extensions - Containing Type
- Kudu
Client Zip Extensions
Syntax
public static void ZipUploadStream(this IKuduClient client, Stream sourceStream, 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);
using(Stream sourceStream = kuduClient.FileSystem.GetFile(zipFilePath).OpenRead())
{
kuduClient.ZipUploadStream(
sourceStream,
remoteDirectoryPath);
}
Parameters
Name | Type | Description |
---|---|---|
client | IKuduClient | The Kudu client. |
sourceStream | Stream | The source stream. |
remotePath | DirectoryPath | The remote directory path. |
Return Value
Type | Description |
---|---|
void |