mercurial/revlogutils/randomaccessfile.py
changeset 51851 eb9dea148233
parent 51179 a93e52f0b6ff
child 51860 1c5810ce737e
equal deleted inserted replaced
51850:5baa52ca4932 51851:eb9dea148233
   169             yield
   169             yield
   170 
   170 
   171     def read_chunk(self, offset, length):
   171     def read_chunk(self, offset, length):
   172         """Read a chunk of bytes from the file.
   172         """Read a chunk of bytes from the file.
   173 
   173 
   174         Accepts an absolute offset, length to read, and an optional existing
   174         Accepts an absolute offset, length to read.
   175         file handle to read from.
       
   176 
       
   177         If an existing file handle is passed, it will be seeked and the
       
   178         original seek position will NOT be restored.
       
   179 
   175 
   180         Returns a str or buffer of raw byte data.
   176         Returns a str or buffer of raw byte data.
   181 
   177 
   182         Raises if the requested number of bytes could not be read.
   178         Raises if the requested number of bytes could not be read.
   183         """
   179         """