references/sleep-functions/pr_exists.md

GitHub

pr_exists

Category: FileSystem

Source: https://sleep.dashnine.org/manual/pr_exists.html


Synopsis

-exists "file"

A predicate to check if a file exists

Parameters

"file" - the file to check.

Returns

True or false and this operator is only usable in a comparison context.

Examples

Example:

if (-exists "/var/www/secret_files")
{
`tar zvf my_secrets_now.tgz`;
}

See Also

-isDir; -isFile; -isHidden; &lof