Adds an exists command.
555770
public Exists exists(String path) {
        Exists command = new Exists();
        command.path(path);
        action.setCommand(command);
        return command;
    }
1185548
def exists(self, name):
        
        with self.pipe as pipe:
            return pipe.exists(self.redis_key(name))
1178907
def click_exists(self, *args, **kwargs):
        
        if len(args) > 0:
            return self.click_nowait(*args, **kwargs)
        else:
            elem = self(**kwargs)
            if elem.exists:
                return elem.click()
166684
def exists(self, relpath, rsc=None, useFilepath=None):
        
        path = self.find(relpath, rsc, useFilepath)
        if path.startswith(':'):
            return QtCore.QResource(path).isValid()
        else:
            return os.path.exists(path)
1332797
def _ensure_dir_exists(path):
    """"""
    if not op.exists(path):
        os.makedirs(path)
    assert op.exists(path) and op.isdir(path)
325840
function exists( path, clbk ) {
	fcn( path, done );

	/**
	* FUNCTION: done( error )
	*	Callback invoked performing a filesystem call.
	*
	* @private
	* @param {Error|Null} error - error object
	*/
	function done( error ) {
		if ( clbk.length === 2 ) {
			if ( error ) {
				return clbk( error, false );
			}
			return clbk( null, true );
		}
		if ( error ) {
			return clbk( false );
		}
		return clbk( true );
	}
}
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))
485524
def check_existence(to_check, name, config_key=None, relative_to=None,
                    allow_undefined=False, allow_not_existing=False,
                    base_key='releaser'):
    """"""
    if allow_undefined and (to_check is None or to_check.lower() == 'none'):
        print("{: <14} -> {}UNDEFINED{}".format(name, WARNING_COLOR,
                                                RESET_COLOR))
        return
    else:
        if config_key is None:
            config_key = "{}.{}".format(base_key, name)
        my_check = Path(to_check).resolve()
        if my_check.exists() and relative_to is not None:
            printed_path = str(my_check.relative_to(relative_to))
            if printed_path != '.':
                printed_path = '.' + os.sep + printed_path
        else:
            printed_path = str(my_check)
        if my_check.exists() or allow_not_existing:
            print("{: <14} -> {}".format(name, printed_path))
            return
        else:
            raise FileNotFoundError("[{}ERROR{}] '{}', as given, doesn't "
                                    "exist. For configuration key '{}', was "
                                    "given: {}".format(ERROR_COLOR, RESET_COLOR,
                                                       name, config_key,
                                                       to_check))
795880
def add_commands(cmds):
    
    if not isinstance(cmds, Iterable):
        cmds = [cmds]

    for command in cmds:
        if command.__name__.endswith("Command"):
            globals()[command.__name__] = command
382894
function exists(file, src, opts) {
	var files = opts.path.map(function (dir) {
		return path.join(dir, file);
	});

	files = globby.sync(files);

	if (!files.length) {
		throw new Error(createError(file, src, opts.path));
	}

	return files[0];
}
1227873
def _check_file_exists_unix(self, remote_cmd=""):
        """"""
        if self.direction == "put":
            self.ssh_ctl_chan._enter_shell()
            remote_cmd = "ls {}".format(self.file_system)
            remote_out = self.ssh_ctl_chan.send_command(
                remote_cmd, expect_string=r"[\$#]"
            )
            self.ssh_ctl_chan._return_cli()
            return self.dest_file in remote_out
        elif self.direction == "get":
            return os.path.exists(self.dest_file)
593687
def dir_exists(location, use_sudo=False):
    """"""
    with settings(hide('running', 'stdout', 'stderr'), warn_only=True):
        if use_sudo:
            # convert return code 0 to True
            return not bool(sudo('test -d %s' % (location)).return_code)
        else:
            return not bool(run('test -d %s' % (location)).return_code)
115448
def ensure_exists(self):
        """"""
        if not cache.exists(self.config):
            logger.debug("Wily cache not found, creating.")
            cache.create(self.config)
            logger.debug("Created wily cache")
        else:
            logger.debug(f"Cache {self.config.cache_path} exists")
528052
public function exists(string $command, array $arguments = []): bool
    {
        return $this->storage->contains(function ($value) use ($command, $arguments) {
            return $value['command'] === $command && $value['arguments'] === $arguments;
        });
    }
517947
def check_exists(name, path):
    '''
    
    '''
    cmd = [_get_cmd(), '--display', name]
    out = __salt__['cmd.run_all'](cmd, python_shell=False)

    if out['retcode'] > 0 and out['stderr'] != '':
        return False

    return any((line.startswith(path) for line in out['stdout'].splitlines()))
99053
def script_exists(self, digest, *digests):
        """"""
        return self.execute(b'SCRIPT', b'EXISTS', digest, *digests)
413093
def add_command(self, cmd_name, *args):
        """"""
        self.__commands.append(Command(cmd_name, args))