Ensure changes to file f are physically on disk.
(f)
| 2192 | os.getpid())) |
| 2193 | |
| 2194 | def _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 | |
| 2200 | def _sync_close(f): |
| 2201 | """Close file f, ensuring all changes are physically on disk.""" |
no test coverage detected