DataLakeFileClient.AppendAsync Method

Definition

The AppendAsync(Stream, Int64, DataLakeFileAppendOptions, CancellationToken) operation uploads data to be appended to a file. Data can only be appended to a file. To apply perviously uploaded data to a file, call Flush Data. Append is currently limited to 4000 MB per request. To upload large files all at once, consider using UploadAsync(Stream).

For more information, see Update Path.

public virtual System.Threading.Tasks.Task<Azure.Response> AppendAsync (System.IO.Stream content, long offset, Azure.Storage.Files.DataLake.Models.DataLakeFileAppendOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AppendAsync : System.IO.Stream * int64 * Azure.Storage.Files.DataLake.Models.DataLakeFileAppendOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.AppendAsync : System.IO.Stream * int64 * Azure.Storage.Files.DataLake.Models.DataLakeFileAppendOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AppendAsync (content As Stream, offset As Long, Optional options As DataLakeFileAppendOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

content
Stream

A Stream containing the content to upload.

offset
Int64

This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. It is required when uploading data to be appended to the file and when flushing previously uploaded data to the file. The value must be the position where the data is to be appended. Uploaded data is not immediately flushed, or written, to the file. To flush, the previously uploaded data must be contiguous, the position parameter must be specified and equal to the length of the file after all data has been written, and there must not be a request entity body included with the request.

options
DataLakeFileAppendOptions

Optional parameters.

cancellationToken
CancellationToken

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

Returns

A Response describing the state of the updated file.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to