def GetParentFileEntry(self):
    """Retrieves the root file entry.

    Returns:
      The parent file entry (instance of FileEntry) or None.
    """
    location = getattr(self.path_spec, u'location', None)
    if location is None:
      return

    parent_location = self._file_system.DirnamePath(location)
    if parent_location is None:
      return

    if parent_location == u'':
      parent_location = self._file_system.PATH_SEPARATOR

    path_spec = fake_path_spec.FakePathSpec(location=parent_location)
    return FakeFileEntry(self._resolver_context, self._file_system, path_spec)
dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/vfs/fake_file_entry.py/FakeFileEntry.GetParentFileEntry/original