Condividi tramite


DataLakeFileClient.Append Method

Definition

The Append(Stream, Int64, DataLakeFileAppendOptions, CancellationToken) operation uploads data to be appended to a file. Data can only be appended to a file. To apply previously 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 Upload(Stream).

For more information, see Update Path.

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