code: def FileEntryExistsByPathSpec(self, path_spec):
      
      tsk_vs_part, _ = tsk_partition.GetTSKVsPartByPathSpec(
          self._tsk_volume, path_spec)
  
      # The virtual root file has not corresponding TSK volume system part object
      # but should have a location.
      if tsk_vs_part is None:
        location = getattr(path_spec, 'location', None)
        return location is not None and location == self.LOCATION_ROOT
  
      return True
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 or false otherwise.