Returns ``True`` if the path for this FileSystemTarget exists; ``False`` otherwise.

        This method is implemented by using :py:attr:`fs`.
966973
def exists(self):
        
        path = self.path
        if '*' in path or '?' in path or '[' in path or '{' in path:
            logger.warning("Using wildcards in path %s might lead to processing of an incomplete dataset; "
                           "override exists() to suppress the warning.", path)
        return self.fs.exists(path)
1054475
def _package_exists(path):
    # type: (str) -> bool
    
    while path:
        if os.path.exists(path):
            return True
        else:
            path = os.path.dirname(path)

    return False
633383
def exists(self):
        
        try:
            self.stat()
        except OSError as e:
            if e.errno not in (ENOENT, ENOTDIR):
                raise
            return False
        return True
259197
function fileExists(file_path) {
  try {
    var stats = fs.statSync(file_path);
    if (stats.isFile()) {
      return true;
    }
  } catch (e) {
  }
  return false;
}
1004902
def check_exists(path, type='file'):
    

    if type == 'file':
        if not os.path.isfile(path):
            raise RuntimeError('The file `%s` does not exist.' % path)
    else:
        if not os.path.isdir(path):
            raise RuntimeError('The folder `%s` does not exist.' % path)

    return True
1233282
def exists(self, path):
        
        _complain_ifclosed(self.closed)
        return self.fs.exists(path)
494613
def exists(self):
        
        return gf.file_exists(self.file_path) or gf.directory_exists(self.file_path)
629102
def exists(self):
        
        if self.name in ("", "/") and self.parent is None:
            return True
        else:
            return self in self.parent.directories
421599
def exists(*paths):
    
    for path in paths:
        log(_("checking that {} exists...").format(path))
        if not os.path.exists(path):
            raise Failure(_("{} not found").format(path))
1316007
def has_files(the_path):
    """"""
    the_path = Path(the_path)
    try:
        for _ in the_path.walkfiles():
            return True
        return False
    except OSError as ex:
        if ex.errno == errno.ENOENT:
            # ignore
            return False
        else:
            raise
127921
def exists(self, path, **kwargs):
        """"""
        try:
            self.get_file_status(path, **kwargs)
            return True
        except HdfsFileNotFoundException:
            return False
980560
def file_is_present(self, file_path):
        
        real_path = self.cont_path(file_path)
        if not os.path.exists(real_path):
            return False
        if not os.path.isfile(real_path):
            raise IOError("%s is not a file" % file_path)
        return True
620599
def in_system_path(filename):
    
    fn = sdk_normalize(os.path.realpath(filename))
    if fn.startswith('/usr/local/'):
        return False
    elif fn.startswith('/System/') or fn.startswith('/usr/'):
        return True
    else:
        return False
557220
def file_exists(self) -> bool:
        
        cfg_path = self.file_path
        assert cfg_path

        return path.isfile(cfg_path)
391519
def ensure_path_exists(self):
        # type: (LocalDestinationPath) -> None
        
        if self._is_dir is None:
            raise RuntimeError('is_dir not set')
        if self._is_dir:
            self._path.mkdir(mode=0o750, parents=True, exist_ok=True)
        else:
            if self._path.exists() and self._path.is_dir():
                raise RuntimeError(
                    ('destination path {} already exists and is a '
                     'directory').format(self._path))
            else:
                # ensure parent path exists and is created
                self._path.parent.mkdir(
                    mode=0o750, parents=True, exist_ok=True)
1302474
def is_valid_file(path):
    '''  '''
    return os.path.exists(path) and os.path.isfile(path)
1032025
def exists(path, with_expected_db_version=None):
        
        dbmetafile = os.path.join(path, AnchoreImageDB._db_metadata_filename)

        if not os.path.exists(path) or not os.path.exists(dbmetafile):
            return False

        if with_expected_db_version:
            with open(dbmetafile, 'r') as f:
                json_dict = json.load(f)

            if json_dict['anchore_db_version'] != with_expected_db_version:
                return False
        else:
            return True