public void Download(FsPath src_path, LocalPath dest_path, DownloadOptions options) { using (var stream = this.RestClients.FileSystemRest.Open(this.Store, src_path)) { var filemode = options.Append ? System.IO.FileMode.Append : System.IO.FileMode.Create; using (var fileStream = new System.IO.FileStream(dest_path.ToString(), filemode)) { stream.CopyTo(fileStream); } } }
public void Upload(LocalPath src_path, FsPath dest_path, UploadOptions options) { var parameters = new Microsoft.Azure.Management.DataLake.StoreUploader.UploadParameters(src_path.ToString(), dest_path.ToString(), this.Store.Name, isOverwrite: options.Force); var frontend = new Microsoft.Azure.Management.DataLake.StoreUploader.DataLakeStoreFrontEndAdapter(this.Store.Name, this.RestClients.FileSystemRest.RestClient); var uploader = new Microsoft.Azure.Management.DataLake.StoreUploader.DataLakeStoreUploader(parameters, frontend); uploader.Execute(); }