...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Defined in header <boost/beast/core/file_base.hpp>
enum file_mode
Name |
Description |
---|---|
|
Random reading. |
|
Sequential reading. |
|
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. |
|
Random writing to new file only. If the file exists, an error is generated. |
|
Random writing to existing file. If the file does not exist, an error is generated. |
|
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. |
|
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. |
|
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. |
These modes are used when opening files using instances of the File concept.
Convenience header <boost/beast/core.hpp>