Share via


FileSystemOperationsExtensions.Append Method

Definition

Used for serial appends to the specified file. NOTE: The target must not contain data added by ConcurrentAppend. ConcurrentAppend and Append cannot be used interchangeably; once a target file has been modified using either of these append options, the other append option cannot be used on the target file.

public static void Append (this Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations operations, string accountName, string directFilePath, System.IO.Stream streamContents, long? offset = default, Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag? syncFlag = default, Guid? leaseId = default, Guid? fileSessionId = default);
public static void Append (this Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations operations, string accountName, string path, System.IO.Stream streamContents, long? offset = default, Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag? syncFlag = default, Guid? leaseId = default, Guid? fileSessionId = default);
static member Append : Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations * string * string * System.IO.Stream * Nullable<int64> * Nullable<Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag> * Nullable<Guid> * Nullable<Guid> -> unit
static member Append : Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations * string * string * System.IO.Stream * Nullable<int64> * Nullable<Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag> * Nullable<Guid> * Nullable<Guid> -> unit
<Extension()>
Public Sub Append (operations As IFileSystemOperations, accountName As String, directFilePath As String, streamContents As Stream, Optional offset As Nullable(Of Long) = Nothing, Optional syncFlag As Nullable(Of SyncFlag) = Nothing, Optional leaseId As Nullable(Of Guid) = Nothing, Optional fileSessionId As Nullable(Of Guid) = Nothing)
<Extension()>
Public Sub Append (operations As IFileSystemOperations, accountName As String, path As String, streamContents As Stream, Optional offset As Nullable(Of Long) = Nothing, Optional syncFlag As Nullable(Of SyncFlag) = Nothing, Optional leaseId As Nullable(Of Guid) = Nothing, Optional fileSessionId As Nullable(Of Guid) = Nothing)

Parameters

operations
IFileSystemOperations

The operations group for this extension method.

accountName
String

The Azure Data Lake Store account to execute filesystem operations on.

directFilePathpath
String

The Data Lake Store path (starting with '/') of the file to which to append.

streamContents
Stream

The file contents to include when appending to the file.

offset
Nullable<Int64>

The optional offset in the stream to begin the append operation. Default is to append at the end of the stream.

syncFlag
Nullable<SyncFlag>

Optionally indicates what to do after completion of the concurrent append. DATA indicates that more data will be sent immediately by the client, the file handle should remain open/locked, and file metadata (including file length, last modified time) should NOT get updated. METADATA indicates that more data will be sent immediately by the client, the file handle should remain open/locked, and file metadata should get updated. CLOSE indicates that the client is done sending data, the file handle should be closed/unlocked, and file metadata should get updated. Possible values include: 'DATA', 'METADATA', 'CLOSE'

leaseId
Nullable<Guid>

Optional unique GUID per file to ensure single writer semantics, meaning that only clients that append to the file with the same leaseId will be allowed to do so.

fileSessionId
Nullable<Guid>

Optional unique GUID per file indicating all the appends with the same fileSessionId are from the same client and same session. This will give a performance benefit when syncFlag is DATA or METADATA.

Applies to