/// <summary> /// Uploads zip file to expand into remote directory path. /// </summary> /// <param name="client">The Kudu client.</param> /// <param name="localPath">The local source file path.</param> /// <param name="remotePath">The remote target directory path.</param> /// <example> /// <code> /// #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); /// </code> /// </example> public static void ZipUploadFile( this IKuduClient client, FilePath localPath, DirectoryPath remotePath) { client.UploadFile(localPath, remotePath, EncodeZipPath); }
/// <summary> /// Uploads file to remote path. /// </summary> /// <param name="client">The Kudu client.</param> /// <param name="localPath">The local source file path.</param> /// <param name="remotePath">The remote target file path.</param> /// <example> /// <code> /// #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"; /// /// kuduClient.VFSUploadFile(localFilePath, remoteFilePath); /// </code> /// </example> // ReSharper disable once InconsistentNaming public static void VFSUploadFile( this IKuduClient client, FilePath localPath, FilePath remotePath) { client.UploadFile(localPath, remotePath, EncodeVFSPath); }