"README.md" did not exist on "13b92a6c99e84ed7114f6ee4eb92d38c1b5b1496"
ENH: improve OFstream append behaviour (#3160)
- previous support for file appending (unused in the meantime) specified opening with `std::ios_base::app`. However, this also enforces append behaviour for each write operation and thus disallows any seek/repositioning within the output file. Now treat append as an "append-like" behaviour instead. If the file already exists, its contents will be preserved and the *initial* output position is moved to the file end. All subsequent write operations respect the current file position without an additional seek-to-end on each write. This enables support of file appending/overwriting, but does preclude concurrent file output.
Showing
- applications/test/OFstream/Test-OFstream.cxx 146 additions, 20 deletionsapplications/test/OFstream/Test-OFstream.cxx
- src/OpenFOAM/db/IOstreams/Fstreams/OFstream.H 34 additions, 8 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/OFstream.H
- src/OpenFOAM/db/IOstreams/Fstreams/fstreamPointer.H 33 additions, 9 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/fstreamPointer.H
- src/OpenFOAM/db/IOstreams/Fstreams/fstreamPointers.C 78 additions, 25 deletionssrc/OpenFOAM/db/IOstreams/Fstreams/fstreamPointers.C
Please register or sign in to comment