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

    Returns:
      ZipFileEntry: parent file entry or None if not available.
    """
    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return None

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

    parent_path_spec = getattr(self.path_spec, 'parent', None)

    if parent_location == '':
      parent_location = self._file_system.PATH_SEPARATOR
      is_root = True
      is_virtual = True
    else:
      is_root = False
      is_virtual = False

    path_spec = zip_path_spec.ZipPathSpec(
        location=parent_location, parent=parent_path_spec)
    return ZipFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root,
        is_virtual=is_virtual)
def GetParentFileEntry ( self ) : location = getattr ( self . path_spec , 'location' , None ) if location is None : return None parent_location = self . _file_system . DirnamePath ( location ) if parent_location is None : return None parent_path_spec = getattr ( self . path_spec , 'parent' , None ) if parent_location == '' : parent_location = self . _file_system . PATH_SEPARATOR is_root = True is_virtual = True else : is_root = False is_virtual = False path_spec = zip_path_spec . ZipPathSpec ( location = parent_location , parent = parent_path_spec ) return ZipFileEntry ( self . _resolver_context , self . _file_system , path_spec , is_root = is_root , is_virtual = is_virtual )
Retrieves the parent file entry.

    Returns:
      ZipFileEntry: parent file entry or None if not available.