def seek(self, offset, whence=os.SEEK_SET):
    self._check_open()

    self._buffer.reset()
    self._buffer_future = None

    if whence == os.SEEK_SET:
      self._offset = offset
    elif whence == os.SEEK_CUR:
      self._offset += offset
    elif whence == os.SEEK_END:
      self._offset = self._file_size + offset
    else:
      raise ValueError('Whence mode %s is invalid.' % str(whence))

    self._offset = min(self._offset, self._file_size)
    self._offset = max(self._offset, 0)
    if self._remaining():
      self._request_next_buffer()
Set the file's current offset.
dataset/ETHPy150Open GoogleCloudPlatform/billing-export-python/cloudstorage/storage_api.py/ReadBuffer.seek