MCPcopy
hub / github.com/Textualize/toolong / get_raw

Method get_raw

src/toolong/log_file.py:135–144  ·  view source on GitHub ↗
(self, start: int, end: int)

Source from the content-addressed store, hash-verified

133 if IS_WINDOWS:
134
135 def get_raw(self, start: int, end: int) -> bytes:
136 with self._lock:
137 if start >= end or self.file is None:
138 return b""
139 position = os.lseek(self.fileno, 0, os.SEEK_CUR)
140 try:
141 os.lseek(self.fileno, start, os.SEEK_SET)
142 return os.read(self.fileno, end - start)
143 finally:
144 os.lseek(self.fileno, position, os.SEEK_SET)
145
146 else:
147

Callers 2

get_lineMethod · 0.95
advance_searchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected