FileSystemOperationsExtensions.Create Method

Definition

Creates a file with optionally specified content. NOTE: If content is provided, the resulting file cannot be modified using ConcurrentAppend.

public static void Create (this Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations operations, string accountName, string directFilePath, System.IO.Stream streamContents = default, bool? overwrite = default, Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag? syncFlag = default, Guid? leaseId = default, int? permission = default);
public static void Create (this Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations operations, string accountName, string path, System.IO.Stream streamContents = default, bool? overwrite = default, Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag? syncFlag = default, Guid? leaseId = default, int? permission = default);
static member Create : Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations * string * string * System.IO.Stream * Nullable<bool> * Nullable<Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag> * Nullable<Guid> * Nullable<int> -> unit
static member Create : Microsoft.Azure.Management.DataLake.Store.IFileSystemOperations * string * string * System.IO.Stream * Nullable<bool> * Nullable<Microsoft.Azure.Management.DataLake.Store.Models.SyncFlag> * Nullable<Guid> * Nullable<int> -> unit
<Extension()>
Public Sub Create (operations As IFileSystemOperations, accountName As String, directFilePath As String, Optional streamContents As Stream = Nothing, Optional overwrite As Nullable(Of Boolean) = Nothing, Optional syncFlag As Nullable(Of SyncFlag) = Nothing, Optional leaseId As Nullable(Of Guid) = Nothing, Optional permission As Nullable(Of Integer) = Nothing)
<Extension()>
Public Sub Create (operations As IFileSystemOperations, accountName As String, path As String, Optional streamContents As Stream = Nothing, Optional overwrite As Nullable(Of Boolean) = Nothing, Optional syncFlag As Nullable(Of SyncFlag) = Nothing, Optional leaseId As Nullable(Of Guid) = Nothing, Optional permission As Nullable(Of Integer) = 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 create.

streamContents
Stream

The file contents to include when creating the file. This parameter is optional, resulting in an empty file if not specified.

overwrite
Nullable<Boolean>

The indication of if the file should be overwritten.

syncFlag
Nullable<SyncFlag>

Optionally indicates what to do after completion of the create. 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.

permission
Nullable<Int32>

The octal representation of the unnamed user, mask and other permissions that should be set for the file when created. If not specified, it inherits these from the container.

Applies to