FileAccessMode FileAccessMode FileAccessMode FileAccessMode Enum

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

Syntax

Declaration

public enum FileAccessModepublic enum FileAccessModePublic Enum FileAccessModepublic enum FileAccessMode

Remarks

For more explanation on usage, see OpenAsync(FileAccessMode, StorageOpenOptions).

Fields

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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Storage.dll