Determines whether a path exists or not.
186930
def exists(self, filename):
        """"""
        client = boto3.client("s3")
        bucket, path = self.bucket_and_path(filename)
        r = client.list_objects(Bucket=bucket, Prefix=path, Delimiter="/")
        if r.get("Contents") or r.get("CommonPrefixes"):
            return True
        return False
551496
def specific_path_check(path, opt):
    """"""
    if opt.exclude:
        if path in opt.exclude:
            return False

    if opt.include:
        if path not in opt.include:
            return False

    return True
704928
def exists(name, path=None):
    '''
    
    '''

    _exists = name in ls_(path=path)
    # container may be just created but we did cached earlier the
    # lxc-ls results
    if not _exists:
        _exists = name in ls_(cache=False, path=path)
    return _exists
131507
def is_in_path(program):
	'''
	
	'''

	if sys.version_info.major == 2:
		path = os.getenv('PATH')
		if os.name == 'nt':
			path = path.split(';')
		else:
			path = path.split(':')
	else:
		path = os.get_exec_path()

	for i in path:
		if os.path.isdir(i):
			if program in os.listdir(i):
				return True
387015
def exists(self, path):
    
    if self._json is None:
      return False

    node = self._json
    path_arr = path.split('.')
    while len(path_arr) > 0:
      path_item = path_arr.pop(0)
      if path_item in node and len(path_arr) == 0:
        return True
      elif path_item in node and len(path_arr) > 0:
        node = node[path_item]
      else:
        return False

    return False
109599
public boolean exists(final Path f) throws IOException {
		try {
			return (getFileStatus(f) != null);
		} catch (FileNotFoundException e) {
			return false;
		}
	}
297634
def is_path(value):
    
    return value and isinstance(value, six.string_types) and (value[0] == posixpath.sep or value[:2] == CURRENT_DIR)
581386
def _cs_path_exists(fspath):
        
        if not os.path.exists(fspath):
            return False
        # make absolute so we always have a directory
        abspath = os.path.abspath(fspath)
        directory, filename = os.path.split(abspath)
        return filename in os.listdir(directory)
188357
public boolean exists(URI path)
      throws IOException {
    logger.atFine().log("exists(%s)", path);
    return getFileInfo(path).exists();
  }
1277651
protected boolean checkExists(String path) {
        try {
            return client.checkExists().forPath(path) != null;
        } catch (Exception e) {
            throw new NiubiException(e);
        }
    }
1319371
def check_path(path, create=False):
    
    if not os.path.exists(path):
        if create:
            os.makedirs(path)
            return os.path.exists(path)
        else:
            return False

    return True
1327333
def exists(self, filepath):
        """"""
        if self.is_ssh(filepath):
            self._check_ftp()
            remotepath = self._get_remote(filepath)
            try:
                self.ftp.stat(remotepath)
            except IOError as e:
                if e.errno == errno.ENOENT:
                    return False
            else:
                return True
        else:
            return os.path.exists(filepath)
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
388119
def exists(self, path, mtime=None):
        
        self._connect()

        if self.sftp:
            exists = self._sftp_exists(path, mtime)
        else:
            exists = self._ftp_exists(path, mtime)

        self._close()

        return exists
1286899
def exists(path):
    """"""
    try:
        return path.expanduser().absolute().exists()
    except AttributeError:
        return os.path.exists(os.path.abspath(os.path.expanduser(str(path))))
615959
def existing_path(value):
    """"""
    if os.path.exists(value):
        return value
    else:
        raise argparse.ArgumentTypeError("Path {0} not found".format(value))
872281
def _file_exists(path, filename):
  """"""
  return os.path.isfile(os.path.join(path, filename))