Share via


AdlsClient.BulkDownload Method

Definition

Overloads

BulkDownload(String, String, Int32, IfExists, IProgress<TransferStatus>, Boolean, Boolean, CancellationToken)

Download directory or file from remote server to local. Transfers the contents under source directory under the destination directory. Transfers the source file and saves it as the destination path. This method does not throw any exception for any entry's transfer failure. Refer the return value TransferStatus to get the status/exception of each entry's transfer. It is highly recomended to set ServicePointManager.DefaultConnectionLimit to the number of threads application wants the sdk to use before creating any instance of AdlsClient. By default ServicePointManager.DefaultConnectionLimit is set to 2.

BulkDownload(String, String, Int32, IfExists, Boolean, IProgress<TransferStatus>, Boolean, Boolean, CancellationToken)

Download directory or file from remote server to local. Transfers the contents under source directory under the destination directory. Transfers the source file and saves it as the destination path. This method does not throw any exception for any entry's transfer failure. Refer the return value TransferStatus to get the status/exception of each entry's transfer. By default logs the transfer progress in system's temp path, so that user can recover using resume if upload has crashed. This progress logging can be disabled using disableTransferLogging. It is highly recomended to set ServicePointManager.DefaultConnectionLimit to the number of threads application wants the sdk to use before creating any instance of AdlsClient. By default ServicePointManager.DefaultConnectionLimit is set to 2.

BulkDownload(String, String, Int32, IfExists, IProgress<TransferStatus>, Boolean, Boolean, CancellationToken)

Download directory or file from remote server to local. Transfers the contents under source directory under the destination directory. Transfers the source file and saves it as the destination path. This method does not throw any exception for any entry's transfer failure. Refer the return value TransferStatus to get the status/exception of each entry's transfer. It is highly recomended to set ServicePointManager.DefaultConnectionLimit to the number of threads application wants the sdk to use before creating any instance of AdlsClient. By default ServicePointManager.DefaultConnectionLimit is set to 2.

public virtual Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus BulkDownload (string srcPath, string destPath, int numThreads = -1, Microsoft.Azure.DataLake.Store.IfExists shouldOverwrite = Microsoft.Azure.DataLake.Store.IfExists.Overwrite, IProgress<Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus> progressTracker = default, bool notRecurse = false, bool resume = false, System.Threading.CancellationToken cancelToken = default);
abstract member BulkDownload : string * string * int * Microsoft.Azure.DataLake.Store.IfExists * IProgress<Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus> * bool * bool * System.Threading.CancellationToken -> Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus
override this.BulkDownload : string * string * int * Microsoft.Azure.DataLake.Store.IfExists * IProgress<Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus> * bool * bool * System.Threading.CancellationToken -> Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus
Public Overridable Function BulkDownload (srcPath As String, destPath As String, Optional numThreads As Integer = -1, Optional shouldOverwrite As IfExists = Microsoft.Azure.DataLake.Store.IfExists.Overwrite, Optional progressTracker As IProgress(Of TransferStatus) = Nothing, Optional notRecurse As Boolean = false, Optional resume As Boolean = false, Optional cancelToken As CancellationToken = Nothing) As TransferStatus

Parameters

srcPath
String

Remote source path

destPath
String

Local destination path. It should always be a directory.

numThreads
Int32

Number of threads- if not passed will take default number of threads (8 times the number of physical cores)

shouldOverwrite
IfExists

Whether to overwrite or skip if the destination exists

progressTracker
IProgress<TransferStatus>

Progresstracker to track progress of file transfer

notRecurse
Boolean

If true then does an enumeration till level one else does recursive enumeration

resume
Boolean

If true then we want to resume from last transfer

cancelToken
CancellationToken

Cancel token

Returns

Transfer status encapsulating the details of download

Applies to

BulkDownload(String, String, Int32, IfExists, Boolean, IProgress<TransferStatus>, Boolean, Boolean, CancellationToken)

Download directory or file from remote server to local. Transfers the contents under source directory under the destination directory. Transfers the source file and saves it as the destination path. This method does not throw any exception for any entry's transfer failure. Refer the return value TransferStatus to get the status/exception of each entry's transfer. By default logs the transfer progress in system's temp path, so that user can recover using resume if upload has crashed. This progress logging can be disabled using disableTransferLogging. It is highly recomended to set ServicePointManager.DefaultConnectionLimit to the number of threads application wants the sdk to use before creating any instance of AdlsClient. By default ServicePointManager.DefaultConnectionLimit is set to 2.

public virtual Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus BulkDownload (string srcPath, string destPath, int numThreads, Microsoft.Azure.DataLake.Store.IfExists shouldOverwrite, bool disableTransferLogging, IProgress<Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus> progressTracker, bool notRecurse, bool resume, System.Threading.CancellationToken cancelToken);
abstract member BulkDownload : string * string * int * Microsoft.Azure.DataLake.Store.IfExists * bool * IProgress<Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus> * bool * bool * System.Threading.CancellationToken -> Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus
override this.BulkDownload : string * string * int * Microsoft.Azure.DataLake.Store.IfExists * bool * IProgress<Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus> * bool * bool * System.Threading.CancellationToken -> Microsoft.Azure.DataLake.Store.FileTransfer.TransferStatus
Public Overridable Function BulkDownload (srcPath As String, destPath As String, numThreads As Integer, shouldOverwrite As IfExists, disableTransferLogging As Boolean, progressTracker As IProgress(Of TransferStatus), notRecurse As Boolean, resume As Boolean, cancelToken As CancellationToken) As TransferStatus

Parameters

srcPath
String

Remote source path

destPath
String

Local destination path. It should always be a directory.

numThreads
Int32

Number of threads- Default -1 if not passed will take default number of threads (8 times the number of physical cores)

shouldOverwrite
IfExists

Whether to overwrite or skip if the destination exists, Default IfExists.Overwrite

disableTransferLogging
Boolean

If true, logging of transfer progress is disabled. This and resume cannot be true at same time. Default false

progressTracker
IProgress<TransferStatus>

Progresstracker to track progress of file transfer, Default null

notRecurse
Boolean

If true then does an enumeration till level one else does recursive enumeration, default false

resume
Boolean

If true then we want to resume from last transfer, default false

cancelToken
CancellationToken

Cancel token

Returns

Transfer status encapsulating the details of download

Applies to