FileAccessMode FileAccessMode FileAccessMode FileAccessMode Enum


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

public : enum class FileAccessModepublic enum FileAccessModePublic Enum FileAccessMode// You can use this enum in JavaScript.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


For more explanation on usage, see OpenAsync.


Read Read Read Read

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

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.