◐ Shell
clean mode source ↗

std::basic_filebuf::sync – cppreference.com

Aus cppreference.com

<metanoindex/>

<tbody> </tbody>

protected: virtual int sync()

Wenn eine Put-Bereich vorhanden ist (z. B. die Datei zum Schreiben geöffnet wurde), ruft overflow() um alle anstehenden Ausgabe in die Datei schreiben .

Original:

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

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Wenn eine get Bereich existiert (zB die Datei zum Lesen geöffnet), ist der Effekt Implementierung definiert. Typische Implementierung kann Abpumpen des get-Bereich und bewegen Sie die aktuelle Position in der Datei zurück durch die entsprechende Anzahl von Bytes .

Original:

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.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parameter

(None)

Original:

(none)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Rückgabewert

0 im Falle des Erfolgs, -1 im Falle des Scheiterns .

Original:

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

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Notes

sync() oder dessen Äquivalent wird implizit durch close(), seekoff() und seekpos() und explizit von std::basic_streambuf::pubsync aufgerufen wird

Original:

sync() or its equivalent is implicitly called by close(), seekoff(), and seekpos() and explicitly called by std::basic_streambuf::pubsync

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Beispiel

Siehe auch

Beruft sync()

Original:

invokes sync()

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(öffentliche Elementfunktion of std::basic_streambuf) [edit]

synchronisiert einen Ausgabe-Stream mit der eigentlichen Datei

Original:

synchronizes an output stream with the actual file

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(Funktion) [edit]