Share via


AdlsClient.CreateFile(String, IfExists, String, Boolean) Method

Definition

Synchronous API that creates a file and returns the stream to write data to that file in ADLS. The file is opened with exclusive access - any attempt to open the same file for append will fail while this stream is open.

Threading: The returned stream is not thread-safe.

public virtual Microsoft.Azure.DataLake.Store.AdlsOutputStream CreateFile (string filename, Microsoft.Azure.DataLake.Store.IfExists mode, string octalPermission = default, bool createParent = true);
abstract member CreateFile : string * Microsoft.Azure.DataLake.Store.IfExists * string * bool -> Microsoft.Azure.DataLake.Store.AdlsOutputStream
override this.CreateFile : string * Microsoft.Azure.DataLake.Store.IfExists * string * bool -> Microsoft.Azure.DataLake.Store.AdlsOutputStream
Public Overridable Function CreateFile (filename As String, mode As IfExists, Optional octalPermission As String = Nothing, Optional createParent As Boolean = true) As AdlsOutputStream

Parameters

filename
String

File name

mode
IfExists

Overwrites the existing file if the mode is Overwrite

octalPermission
String

Octal permission string

createParent
Boolean

If true creates any non-existing parent directories

Returns

Output stream

Applies to