Namespaces
Variants
Views
Actions

std::basic_filebuf::sync

From cppreference.com
< cpp‎ | io‎ | basic filebuf
Revision as of 21:56, 31 May 2013 by P12bot (Talk | contribs)

protected:
virtual int sync()

If a put area exists (e.g. the file was opened for writing), calls Template:rlpf to write all pending output to the file.

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.

Contents

Parameters

(none)

Return value

0 in case of success, -1 in case of failure.

Notes

sync() or its equivalent is implicitly called by Template:rlpf, Template:rlpf, and Template:rlpf and explicitly called by std::basic_streambuf::pubsync

Example

See also

invokes sync()
(public member function of std::basic_streambuf) [edit]
synchronizes an output stream with the actual file
(function) [edit]