Пример #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);
 }
Пример #2
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();
        }
Пример #3
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);
         }
     }
 }
Пример #4
0
        public void Download(FsPath src_path, FsLocalPath dest_path, FileDownloadParameters parameters)
        {
            var src_uri = this.GetUri(src_path);

            this.RestClients.FileSystemRest.Download(src_uri, dest_path, parameters.NumThreads, parameters.Resume, parameters.Overwrite);
        }
Пример #5
0
        public void Upload(FsLocalPath src_path, FsPath dest_path, FileUploadParameters parameters)
        {
            var dest_uri = this.GetUri(dest_path);

            this.RestClients.FileSystemRest.Upload(src_path, dest_uri, parameters.NumThreads, parameters.Resume, parameters.Overwrite, parameters.UploadAsBinary);
        }
Пример #6
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);
 }
Пример #7
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);
 }