code: def FileEntryExistsByPathSpec(self, path_spec):
      
      # Opening a file by inode number is faster than opening a file by location.
      tsk_file = None
      inode = getattr(path_spec, 'inode', None)
      location = getattr(path_spec, 'location', None)
  
      try:
        if inode is not None:
          tsk_file = self._tsk_file_system.open_meta(inode=inode)
        elif location is not None:
          tsk_file = self._tsk_file_system.open(location)
  
      except IOError:
        pass
  
      return tsk_file 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.