MeteoIODoc 20261119.86f8ff36
Environmental timeseries pre-processing
Loading...
Searching...
No Matches
ofilestream and ifilestream

Output options

These wrappers provide some custom functionality for the reading and writing of files. They are based on std::ofstream and std::ifstream respectively.

It is possible to limit the access of MeteoIO by enabling the SANDBOXING compilation option.

The ifilestream uses a large read buffer (see ifilestream::default_buffer_size) so that input files located on slow network mounts can be read with very few requests. When only a small part of a file is going to be read (such as its headers), the caller should provide a smaller buffer size when opening the file.

The following configuration keys are available to control the output:

  • WRITE_DIRECTORIES: If set to true, the software will create non-existing directories in the output path. If set to false, the software will only write to existing directories. Default: true
  • KEEP_OLD_FILES: If set to true, the software will not overwrite existing files, but create a new file with a timestamp in the filename. Default: false

Example

[Output]
WRITE_DIRECTORIES = false
KEEP_OLD_FILES = true