Core.Append 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.
Append data to file. This is a synchronous operation.
Not threadsafe when Append is called for same path from different threads.
public static void Append (string path, string leaseId, string sessionId, Microsoft.Azure.DataLake.Store.SyncFlag flag, long offsetFile, byte[] dataBytes, int offset, int length, Microsoft.Azure.DataLake.Store.AdlsClient client, Microsoft.Azure.DataLake.Store.RequestOptions req, Microsoft.Azure.DataLake.Store.OperationResponse resp);
static member Append : string * string * string * Microsoft.Azure.DataLake.Store.SyncFlag * int64 * byte[] * int * int * Microsoft.Azure.DataLake.Store.AdlsClient * Microsoft.Azure.DataLake.Store.RequestOptions * Microsoft.Azure.DataLake.Store.OperationResponse -> unit
Public Shared Sub Append (path As String, leaseId As String, sessionId As String, flag As SyncFlag, offsetFile As Long, dataBytes As Byte(), offset As Integer, length As Integer, client As AdlsClient, req As RequestOptions, resp As OperationResponse)
Parameters
- path
- String
Path of the file
- leaseId
- String
String containing the lease ID, when a client obtains a lease on a file no other client can make edits to the file
- sessionId
- String
UUID that is used to obtain the file handler (stream) easily at server
- flag
- SyncFlag
Pass SyncFlag.DATA when writing bytes of data Pass SyncFlag.METADATA when metadata of the file like length, modified instant needs to be updated to be consistent with the actual data of file. After passing SyncFlag.METADATA GetFileStatus and ListStatus returns consistent data. Pass SyncFlag.CLOSE when no more data needs to be appended, file metadata is updated, lease is released and the stream is closed
- offsetFile
- Int64
Offset in the file at which data will be appended
- dataBytes
- Byte[]
Array of bytes to write to the file
- offset
- Int32
Offset in the byte array
- length
- Int32
Number of bytes to write from the offset
- client
- AdlsClient
ADLS Client
- req
- RequestOptions
Options to change behavior of the Http request
- resp
- OperationResponse
Stores the response/ouput of the Http request
Applies to
Azure SDK for .NET