Enum
FileOpenMode
Flags to select the open mode of a File or external string.
Include Headers
seqan/seq_io.h
Remarks
These flags can be combined via the | operator. The default open mode is OPEN_RDWR | OPEN_CREATE | OPEN_APPEND .
If you omit the OPEN_APPEND flag in write mode, the file will be cleared when opened.
Functions
Opens a file, stream, or persistent string. |
Values
Open for only reading. | |
Open for only writing. | |
Open for reading and writing. | |
Create a file if it not yet exists. | |
Keep the existing data. If this flag is not given, the file is cleared in write mode. | |
Don't print any warning message if the file could not be opened. | |
(Internal) Bitmask to extract the read/write open mode. | |
(Internal) Open the file for asynchronous file access. For asynchronous file access, use Async. | |
(Internal) Automatically delete the file after close. Use openTemp to open temporary files. |
Examples
Code example to test for read-only mode.
// do something if opened in read-only mode
SeqAn - Sequence Analysis Library - www.seqan.de