std::basic_filebuf<CharT,Traits>::sync (3) - Linux Manuals
std::basic_filebuf<CharT,Traits>::sync: std::basic_filebuf<CharT,Traits>::sync
Command to display std::basic_filebuf<CharT,Traits>::sync
manual in Linux: $ man 3 std::basic_filebuf<CharT,Traits>::sync
NAME
std::basic_filebuf<CharT,Traits>::sync - std::basic_filebuf<CharT,Traits>::sync
Synopsis
protected:
virtual int sync()
If a put area exists (e.g. the file was opened for writing), calls overflow() to write all pending output to the file, then flushes the file as if by calling std::fflush.
If a get area exists (e.g. the file was opened for reading), the effect is implementation-defined. Typical implementation may empty out the get area and move the current file position back by the corresponding number of bytes.
Parameters
(none)
Return value
0 in case of success, -1 in case of failure.
Notes
sync() or its equivalent is implicitly called for output streams by close(), seekoff(), and seekpos() and explicitly called by std::basic_streambuf::pubsync()
Example
This section is incomplete
Reason: no example
See also
invokes sync()
pubsync (public member function of std::basic_streambuf<CharT,Traits>)
synchronizes an output stream with the actual file
fflush (function)
Pages related to std::basic_filebuf<CharT,Traits>::sync
- std::basic_filebuf<CharT,Traits>::seekoff (3) - std::basic_filebuf<CharT,Traits>::seekoff
- std::basic_filebuf<CharT,Traits>::seekpos (3) - std::basic_filebuf<CharT,Traits>::seekpos
- std::basic_filebuf<CharT,Traits>::setbuf (3) - std::basic_filebuf<CharT,Traits>::setbuf
- std::basic_filebuf<CharT,Traits>::showmanyc (3) - std::basic_filebuf<CharT,Traits>::showmanyc
- std::basic_filebuf<CharT,Traits>::swap (3) - std::basic_filebuf<CharT,Traits>::swap
- std::basic_filebuf<CharT,Traits>::basic_filebuf (3) - std::basic_filebuf<CharT,Traits>::basic_filebuf
- std::basic_filebuf<CharT,Traits>::close (3) - std::basic_filebuf<CharT,Traits>::close
- std::basic_filebuf<CharT,Traits>::imbue (3) - std::basic_filebuf<CharT,Traits>::imbue
- std::basic_filebuf<CharT,Traits>::is_open (3) - std::basic_filebuf<CharT,Traits>::is_open
- std::basic_filebuf<CharT,Traits>::open (3) - std::basic_filebuf<CharT,Traits>::open
- std::basic_filebuf<CharT,Traits>::operator= (3) - std::basic_filebuf<CharT,Traits>::operator=
- std::basic_filebuf<CharT,Traits>::overflow (3) - std::basic_filebuf<CharT,Traits>::overflow
- std::basic_filebuf<CharT,Traits>::pbackfail (3) - std::basic_filebuf<CharT,Traits>::pbackfail
- std::basic_filebuf<CharT,Traits>::uflow (3) - std::basic_filebuf<CharT,Traits>::uflow
- std::basic_filebuf<CharT,Traits>::underflow (3) - std::basic_filebuf<CharT,Traits>::underflow
- std::basic_filebuf<CharT,Traits>::~basic_filebuf (3) - std::basic_filebuf<CharT,Traits>::~basic_filebuf
- std::basic_filebuf (3) - std::basic_filebuf
- std::basic_fstream (3) - std::basic_fstream