Beast Logo

PrevUpHomeNext

file_mode

File open modes.

Synopsis

Defined in header <beast/core/file_base.hpp>

enum file_mode

Values

Name

Description

read

Random reading.

scan

Sequential reading.

write

Random writing to a new or truncated file.

If the file does not exist, it is created. If the file exists, it is truncated to zero size upon opening.

write_new

Random writing to new file only.

If the file exists, an error is generated.

write_existing

Random writing to existing file.

If the file does not exist, an error is generated.

append

Appending to a new or truncated file.

The current file position shall be set to the end of the file prior to each write.If the file does not exist, it is created. If the file exists, it is truncated to zero size upon opening.

append_new

Appending to a new file only.

The current file position shall be set to the end of the file prior to each write.If the file exists, an error is generated.

append_existing

Appending to an existing file.

The current file position shall be set to the end of the file prior to each write.If the file does not exist, an error is generated.

Description

These modes are used when opening files using instances of the File concept.

See Also

file_stdio

Convenience header <beast/core.hpp>


PrevUpHomeNext