def _Open(self, path_spec=None, mode='rb'):
    if not path_spec:
      raise ValueError(u'Missing path specification.')

    if path_spec.HasParent():
      raise errors.PathSpecError(u'Unsupported path specification with parent.')

    location = getattr(path_spec, u'location', None)
    if location is None:
      raise errors.PathSpecError(u'Path specification missing location.')

    self._current_offset = 0
    self._size = len(self._file_data)

  # Note: that the following functions do not follow the style guide
  # because they are part of the file-like object interface.
Opens the file-like object defined by path specification.
dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/file_io/fake_file_io.py/FakeFile._Open