MCPcopy
hub / github.com/pandas-dev/pandas / flush

Method flush

pandas/io/pytables.py:782–802  ·  view source on GitHub ↗

Force all buffered modifications to be written to disk. Parameters ---------- fsync : bool (default False) call ``os.fsync()`` on the file handle to force writing to disk. Notes ----- Without ``fsync=True``, flushing may not guaran

(self, fsync: bool = False)

Source from the content-addressed store, hash-verified

780 return bool(self._handle.isopen)
781
782 def flush(self, fsync: bool = False) -> None:
783 """
784 Force all buffered modifications to be written to disk.
785
786 Parameters
787 ----------
788 fsync : bool (default False)
789 call ``os.fsync()`` on the file handle to force writing to disk.
790
791 Notes
792 -----
793 Without ``fsync=True``, flushing may not guarantee that the OS writes
794 to disk. With fsync, the operation will block until the OS claims the
795 file has been written; however, other caching layers may still
796 interfere.
797 """
798 if self._handle is not None:
799 self._handle.flush()
800 if fsync:
801 with suppress(OSError):
802 os.fsync(self._handle.fileno())
803
804 def get(self, key: str):
805 """

Callers 6

write_data_chunkMethod · 0.45
deleteMethod · 0.45
closeMethod · 0.45
test_temporary_tableFunction · 0.45
test_temporary_fileFunction · 0.45
test_flushFunction · 0.45

Calls 1

filenoMethod · 0.80

Tested by 3

test_temporary_tableFunction · 0.36
test_temporary_fileFunction · 0.36
test_flushFunction · 0.36