IFileSystemOperations.DownloadFolder Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Downloads a folder from the specified Data Lake Store account.
public void DownloadFolder (string accountName, string sourcePath, string destinationPath, int perFileThreadCount = -1, int concurrentFileCount = -1, bool resume = false, bool overwrite = false, bool recurse = false, IProgress<Microsoft.Azure.Management.DataLake.Store.TransferFolderProgress> progressTracker = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadFolder : string * string * string * int * int * bool * bool * bool * IProgress<Microsoft.Azure.Management.DataLake.Store.TransferFolderProgress> * System.Threading.CancellationToken -> unit
Public Sub DownloadFolder (accountName As String, sourcePath As String, destinationPath As String, Optional perFileThreadCount As Integer = -1, Optional concurrentFileCount As Integer = -1, Optional resume As Boolean = false, Optional overwrite As Boolean = false, Optional recurse As Boolean = false, Optional progressTracker As IProgress(Of TransferFolderProgress) = Nothing, Optional cancellationToken As CancellationToken = Nothing)
Parameters
- accountName
- String
The Azure Data Lake Store account to execute filesystem operations on.
- sourcePath
- String
The Data Lake Store path (starting with '/') of the directory to download.
- destinationPath
- String
The local path to download the folder to.
- perFileThreadCount
- Int32
The maximum number of threads to use per file during the download. By default, this number will be computed based on folder structure and average file size.
- concurrentFileCount
- Int32
The maximum number of files to download at once. By default, this number will be computed based on folder structure and number of files.
- resume
- Boolean
A switch indicating if this download is a continuation of a previous, failed download. Default is false.
- overwrite
- Boolean
A switch indicating this download should overwrite the contents of the target directory if it exists. Default is false, and the download will fast fail if the target location exists.
- recurse
- Boolean
A switch indicating this download should download the source directory recursively or just the top level. Default is false, only the top level will be downloaded.
- progressTracker
- IProgress<TransferFolderProgress>
An optional delegate that can be used to track the progress of the download operation asynchronously.
- cancellationToken
- CancellationToken
The cancellation token.
Exceptions
Thrown when the operation returned an invalid status code.
Thrown when the operation takes too long to complete or if the user explicitly cancels it.
Thrown when resume metadata is corrupt or not associated with the current operation.
Thrown when the source path cannot be found.
Thrown if an invalid download is attempted or a file/folder is modified externally during the operation.
Thrown if the transfer operation fails.
Thrown when unable to deserialize the response
Thrown when a required parameter is null