code: def FileEntryExistsByPathSpec(self, path_spec):
      
      volume_index = apfs_helper.APFSContainerPathSpecGetVolumeIndex(path_spec)
  
      # The virtual root file has not corresponding volume index but
      # should have a location.
      if volume_index is None:
        location = getattr(path_spec, 'location', None)
        return location is not None and location == self.LOCATION_ROOT
  
      return 0 <= volume_index < self._fsapfs_container.number_of_volumes
docs: Determines if a file entry for a path specification exists.
  
      Args:
        path_spec (PathSpec): a path specification.
  
      Returns:
        bool: True if the file entry exists.