CreateFileAsync(string fileName, FileAccessHints hints, System.Threading.CancellationToken cancellationToken) Method

Creates a new file with the specified path and returns a System.IO.Stream backed by it. The is overwritten if it already exists, and is only guaranteed to allow sequential write access.

Syntax

public virtual Task<System.IO.Stream> CreateFileAsync(string fileName, FileAccessHints hints, System.Threading.CancellationToken cancellationToken)

Parameters

fileName
Type: string

The full path of the file to create in the FileSystem.

hints
Type: FileAccessHints

Hints used to optimize performance of the returned System.IO.Stream.

cancellationToken
Type: System.Threading.CancellationToken

Cancellation token.

Returns

System.IO.Stream backed by the newly created file.