MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _sync_flush

Function _sync_flush

tools/python-3.11.9-amd64/Lib/mailbox.py:2127–2131  ·  view source on GitHub ↗

Ensure changes to file f are physically on disk.

(f)

Source from the content-addressed store, hash-verified

2125 os.getpid()))
2126
2127def _sync_flush(f):
2128 """Ensure changes to file f are physically on disk."""
2129 f.flush()
2130 if hasattr(os, 'fsync'):
2131 os.fsync(f.fileno())
2132
2133def _sync_close(f):
2134 """Close file f, ensuring all changes are physically on disk."""

Callers 2

flushMethod · 0.85
_sync_closeFunction · 0.85

Calls 2

flushMethod · 0.45
filenoMethod · 0.45

Tested by

no test coverage detected