

def GetParentFileEntry(self):
    'Retrieves the root file entry.\n\n    Returns:\n      The parent file entry (instance of FileEntry) or None.\n    '
    location = getattr(self.path_spec, 'location', None)
    if (location is None):
        return
    parent_location = self._file_system.DirnamePath(location)
    if (parent_location is None):
        return
    if (parent_location == ''):
        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