FileAccessMode FileAccessMode FileAccessMode FileAccessMode FileAccessMode Enum


Specifies whether to access a file in read-only mode or in read/write mode.

public : enum class FileAccessMode
enum class winrt::Windows::Storage::FileAccessMode : int32_t
public enum FileAccessMode
Public Enum FileAccessMode
var value =;

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


Read Read Read Read Read 0

Access the file stream in read-only mode.

Keep read-only file streams open only while your app is actively reading from the file. You can use multiple independent read-only streams to read a file. If the file is changed while you're reading it, subsequent read operations fail.

ReadWrite ReadWrite ReadWrite ReadWrite ReadWrite 1

Access the file stream in read/write mode.

A file supports a single stream for writing. Writing is non-transactional and occurs in place; that is, data is written immediately to the target file without using a temporary file. Use read/write mode only when you're ready to write immediately in order to avoid conflicts with other operations.


For more explanation on usage, see OpenAsync.