Ensure changes to file f are physically on disk.
(f)
| 2125 | os.getpid())) |
| 2126 | |
| 2127 | def _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 | |
| 2133 | def _sync_close(f): |
| 2134 | """Close file f, ensuring all changes are physically on disk.""" |
no test coverage detected