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

Method close

tools/python-3.11.9-amd64/Lib/_pyio.py:1763–1774  ·  view source on GitHub ↗

Close the file. A closed file cannot be used for further I/O operations. close() may be called more than once without error.

(self)

Source from the content-addressed store, hash-verified

1761 return size
1762
1763 def close(self):
1764 """Close the file.
1765
1766 A closed file cannot be used for further I/O operations. close() may be
1767 called more than once without error.
1768 """
1769 if not self.closed:
1770 try:
1771 if self._closefd:
1772 os.close(self._fd)
1773 finally:
1774 super().close()
1775
1776 def seekable(self):
1777 """True if file supports random-access."""

Callers 1

__del__Method · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected