MCPcopy Index your code
hub / github.com/RustPython/RustPython / _sync_flush

Function _sync_flush

Lib/mailbox.py:2194–2198  ·  view source on GitHub ↗

Ensure changes to file f are physically on disk.

(f)

Source from the content-addressed store, hash-verified

2192 os.getpid()))
2193
2194def _sync_flush(f):
2195 """Ensure changes to file f are physically on disk."""
2196 f.flush()
2197 if hasattr(os, 'fsync'):
2198 os.fsync(f.fileno())
2199
2200def _sync_close(f):
2201 """Close file f, ensuring all changes are physically on disk."""

Callers 2

flushMethod · 0.85
_sync_closeFunction · 0.85

Calls 3

hasattrFunction · 0.85
flushMethod · 0.45
filenoMethod · 0.45

Tested by

no test coverage detected