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

Method get_file

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

Return a file-like representation or raise a KeyError.

(self, key, from_=False)

Source from the content-addressed store, hash-verified

800 return string.replace(linesep, b'\n')
801
802 def get_file(self, key, from_=False):
803 """Return a file-like representation or raise a KeyError."""
804 start, stop = self._lookup(key)
805 self._file.seek(start)
806 if not from_:
807 self._file.readline()
808 return _PartialFile(self._file, self._file.tell(), stop)
809
810 def _install_message(self, message):
811 """Format a message and blindly write to self._file."""

Callers

nothing calls this directly

Calls 5

_PartialFileClass · 0.85
_lookupMethod · 0.45
seekMethod · 0.45
readlineMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected