code: def FileEntryExistsByPathSpec(self, path_spec):
      
      # Opening a file by MFT entry is faster than opening a file by location.
      # However we need the index of the corresponding $FILE_NAME MFT attribute.
      fsntfs_file_entry = None
      location = getattr(path_spec, 'location', None)
      mft_attribute = getattr(path_spec, 'mft_attribute', None)
      mft_entry = getattr(path_spec, 'mft_entry', None)
  
      try:
        if mft_attribute is not None and mft_entry is not None:
          fsntfs_file_entry = self._fsntfs_volume.get_file_entry(mft_entry)
        elif location is not None:
          fsntfs_file_entry = self._fsntfs_volume.get_file_entry_by_path(location)
  
      except IOError as exception:
        raise errors.BackEndError(exception)
  
      return fsntfs_file_entry is not None
docs: Determines if a file entry for a path specification exists.
  
      Args:
        path_spec (PathSpec): path specification.
  
      Returns:
        bool: True if the file entry exists.
  
      Raises:
        BackEndError: if the file entry cannot be opened.