Share via


MockAdlsClient.CreateFileAsync Method

Definition

Creates an entry to the internal dictionary for the new file. The entry encapsulates AclStatus, DirectoryEntry and a memory stream

public override System.Threading.Tasks.Task<Microsoft.Azure.DataLake.Store.AdlsOutputStream> CreateFileAsync (string filename, Microsoft.Azure.DataLake.Store.IfExists mode, string octalPermission = default, bool createParent = true, System.Threading.CancellationToken cancelToken = default);
override this.CreateFileAsync : string * Microsoft.Azure.DataLake.Store.IfExists * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.DataLake.Store.AdlsOutputStream>
Public Overrides Function CreateFileAsync (filename As String, mode As IfExists, Optional octalPermission As String = Nothing, Optional createParent As Boolean = true, Optional cancelToken As CancellationToken = Nothing) As Task(Of AdlsOutputStream)

Parameters

filename
String

File name

mode
IfExists

If exists hether to overwrite or fail

octalPermission
String

Permission string

createParent
Boolean

True if we create parent directories- currently has no effect

cancelToken
CancellationToken

Cancellation token

Returns

Mock ADls output stream

Applies to