Example #1
0
 /// <summary>
 /// Downloads remote directory to local zip file.
 /// </summary>
 /// <param name="client">The Kudu client.</param>
 /// <param name="remotePath">The remote source path.</param>
 /// <param name="localPath">The local target 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 remoteDirectoryPath = "/site/wwwroot/";
 /// FilePath localFilePath = "./wwwroot.zip";
 ///
 /// kuduClient.ZipDownloadFile(remoteDirectoryPath, localFilePath);
 /// </code>
 /// </example>
 public static void ZipDownloadFile(
     this IKuduClient client,
     DirectoryPath remotePath,
     FilePath localPath)
 {
     client.DownloadFile(remotePath, localPath, EncodeZipPath);
 }
Example #2
0
 /// <summary>
 /// Downloads remote file locally.
 /// </summary>
 /// <param name="client">The Kudu client.</param>
 /// <param name="remotePath">The remote source path.</param>
 /// <param name="localPath">The local target 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.VFSDownloadFile(remoteFilePath, localFilePath);
 /// </code>
 /// </example>
 // ReSharper disable once InconsistentNaming
 public static void VFSDownloadFile(
     this IKuduClient client,
     FilePath remotePath,
     FilePath localPath)
 {
     client.DownloadFile(remotePath, localPath, EncodeVFSPath);
 }