Skip to content
Snippets Groups Projects
Commit 50e81c2f authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: improve OFstream append behaviour (#3160)

- previous support for file appending (largely unused) always
  specified opening with `std::ios_base::app`.

  Now differentiate between append behaviours:

  APPEND_APP  (previously the only append mode)
  ~~~~~~~~~~
  - Existing files will be preserved and a seek-to-end is performed
    at _every_ write.
    With this mode seeks/repositioning within the file will effectively
    be ignored on output.

  APPEND_ATE
  ~~~~~~~~~~
  - Existing files will be preserved and a seek-to-end is performed
    immediately after opening, but not subsequently.
    With this mode it is possible to use manual seeks to overwrite
    parts of a file. Roughly corresponds to `std::ios_base::ate`
    behaviour.
parent 1406f9ec
Branches
Tags
Showing
with 387 additions and 126 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment