DataLakeFileClient.AppendAsync 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.
The AppendAsync(Stream, Int64, Byte[], String, IProgress<Int64>, 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, byte[] contentHash = default, string leaseId = default, IProgress<long> progressHandler = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AppendAsync : System.IO.Stream * int64 * byte[] * string * IProgress<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
override this.AppendAsync : System.IO.Stream * int64 * byte[] * string * IProgress<int64> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function AppendAsync (content As Stream, offset As Long, Optional contentHash As Byte() = Nothing, Optional leaseId As String = Nothing, Optional progressHandler As IProgress(Of Long) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- 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.
- contentHash
- Byte[]
This hash is used to verify the integrity of the request content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). Note that this MD5 hash is not stored with the file. This header is associated with the request content, and not with the stored content of the file itself.
- leaseId
- String
Optional lease id.
Optional IProgress<T> to provide progress updates about data transfers.
- 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
Saran dan Komentar
Kirim dan lihat umpan balik untuk