DataLakeFileClient.ReadAsync Method

Definition

Overloads

ReadAsync()

The ReadAsync() operation downloads a file from the service, including its metadata and properties.

For more information, see Get Blob.

ReadAsync(CancellationToken)

The ReadAsync(CancellationToken) operation downloads a file from the service, including its metadata and properties.

For more information, see Get Blob.

ReadAsync(HttpRange, DataLakeRequestConditions, Boolean, CancellationToken)

The ReadAsync(HttpRange, DataLakeRequestConditions, Boolean, CancellationToken) operation downloads a file from the service, including its metadata and properties.

For more information, see Get Blob.

ReadAsync()

The ReadAsync() operation downloads a file from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>> ReadAsync ();
abstract member ReadAsync : unit -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>>
override this.ReadAsync : unit -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>>
Public Overridable Function ReadAsync () As Task(Of Response(Of FileDownloadInfo))

Returns

Task<Response<FileDownloadInfo>>

A Response<T> describing the downloaded file. Content contains the file's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

ReadAsync(CancellationToken)

The ReadAsync(CancellationToken) operation downloads a file from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>> ReadAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>>
override this.ReadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>>
Public Overridable Function ReadAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FileDownloadInfo))

Parameters

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Task<Response<FileDownloadInfo>>

A Response<T> describing the downloaded file. Content contains the file's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to

ReadAsync(HttpRange, DataLakeRequestConditions, Boolean, CancellationToken)

The ReadAsync(HttpRange, DataLakeRequestConditions, Boolean, CancellationToken) operation downloads a file from the service, including its metadata and properties.

For more information, see Get Blob.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>> ReadAsync (Azure.HttpRange range = default, Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions conditions = default, bool rangeGetContentHash = false, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : Azure.HttpRange * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>>
override this.ReadAsync : Azure.HttpRange * Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.FileDownloadInfo>>
Public Overridable Function ReadAsync (Optional range As HttpRange = Nothing, Optional conditions As DataLakeRequestConditions = Nothing, Optional rangeGetContentHash As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FileDownloadInfo))

Parameters

range
HttpRange

If provided, only donwload the bytes of the file in the specified range. If not provided, download the entire file.

conditions
DataLakeRequestConditions

Optional DataLakeRequestConditions to add conditions on donwloading this file.

rangeGetContentHash
Boolean

When set to true and specified together with the range, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. If this value is specified without range or set to true when the range exceeds 4 MB in size, a RequestFailedException is thrown.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Task<Response<FileDownloadInfo>>

A Response<T> describing the downloaded file. Content contains the file's data.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to