Example #1
0
 public void Upload(FsLocalPath src_path, FsPath dest_path, FileUploadParameters parameters)
 {
     this.RestClients.FileSystemClient.FileSystem.UploadFile(
         this.Account.Name,
         src_path.ToString(),
         dest_path.ToString(), parameters.NumThreads, parameters.Resume, parameters.Overwrite, parameters.UploadAsBinary);
 }
Example #2
0
 public void Download(FsPath src_path, FsLocalPath dest_path, FileDownloadParameters parameters)
 {
     using (var stream = this.RestClients.FileSystemRest.Open(this.Account, src_path))
     {
         var filemode = parameters.Append ? System.IO.FileMode.Append : System.IO.FileMode.Create;
         using (var fileStream = new System.IO.FileStream(dest_path.ToString(), filemode))
         {
             stream.CopyTo(fileStream);
         }
     }
 }
Example #3
0
 public void Download(FsUri frompath, FsLocalPath topath, int threads, bool resume, bool overwrite)
 {
     this.RestClient.FileSystem.DownloadFile(frompath.Account, frompath.Path, topath.ToString(), threads, resume, overwrite);
 }
Example #4
0
 public void Upload(FsLocalPath frompath, FsUri topath, int threads, bool resume, bool overwrite, bool uploadasbinary)
 {
     this.RestClient.FileSystem.UploadFile(topath.Account, frompath.ToString(), topath.Path, threads, resume, overwrite, uploadasbinary);
 }
Example #5
0
        public void Upload(FsLocalPath src_path, FsPath dest_path, FileUploadParameters parameters)
        {
            var uploader_parameters = new Microsoft.Azure.Management.DataLake.StoreUploader.UploadParameters(src_path.ToString(), dest_path.ToString(), this.Account.Name, isOverwrite: parameters.Force);
            var frontend            = new Microsoft.Azure.Management.DataLake.StoreUploader.DataLakeStoreFrontEndAdapter(this.Account.Name, this.RestClients.FileSystemRest.RestClient);
            var uploader            = new Microsoft.Azure.Management.DataLake.StoreUploader.DataLakeStoreUploader(uploader_parameters, frontend);

            uploader.Execute();
        }