Skip to content
  • Mark OLESEN's avatar
    ENH: improve OFstream append behaviour (#3160) · ee895577
    Mark OLESEN authored and Kutalmış Berçin's avatar Kutalmış Berçin committed
    - previous support for file appending (largely unused) always
      specified opening with the std::ios_base::app flag.
    
      Now differentiate between append behaviours:
    
      APPEND_APP
      ~~~~~~~~~~
      Corresponds to std::ios_base::app behaviour:
    
      - 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
      ~~~~~~~~~~
      Largely approximates std::ios_base::ate behaviour:
    
      - Existing files will be preserved and a seek-to-end is performed
        immediately after opening, but not subsequently. Can use seekp()
        to overwrite parts of a file.
    ee895577