FileFlags

Description

[Flags]
enum Tinman.Core.IO.Files.FileFlags

Enumeration of behaviour flags for files in a filesystem.

Exactly one of these flags must be specified:

Any of these flags can be specified in addition to the above creation flag. They do not have any direct functional influence, instead they are meant as hints to the underlying filesystem implementation:

Public / Constants

Read

public constant Read → (0:int32)

Open an existing file in read-only mode.

Write

public constant Write → (1:int32)

Open an existing file in read-write mode.

Update

public constant Update → (2:int32)

Open an existing file in read-write mode or create a new file.

Create

public constant Create → (3:int32)

Create a new file, overwriting any existing one.

Temporary

public constant Temporary → (4:int32)

Create a new file for temporary storage.

Temporary files are deleted automatically when closed.

MaskCreation

public constant MaskCreation → (7:int32)

Bitmask for file flags that determine the creation disposition for the file.

The following flags fall within this bitmask:

  • Read: open existing (read-only)

  • Write: open existing (read-write)

  • Update: open existing (read-write) or create new

  • Create: create new

  • Temporary: create new (temporary)

Sequential

public constant Sequential → (8:int32)

The file is accessed mostly sequentially.

When this flag is not present, file access is assumed to be random.

This is a hint for the underlying filesystem implementation to improve performance. It does not have any functional implications.

NoShare

public constant NoShare → (16:int32)

Prohibits the file from being opened by other processes.

This flag only affects sharing in read-only mode. Sharing files in read-write mode is never allowed.

All

public constant All → (31:int32)

All flags.