[
Check file path predicates including existence, type, and permissions. Returns JSON with result and exit code for script conditions.
Instructions
Evaluate path predicates (file existence, type, permissions) — alias for 'test'. Read-only, no side effects. Returns JSON with predicate result and success/failure exit code. Use in scripts for conditional file checks. Not for detailed file inspection — use 'stat' for full metadata. See also 'test', 'stat'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bracket_directory | No | Path is a directory. | |
| bracket_executable | No | Path is executable. | |
| bracket_exists | No | Path exists. | |
| bracket_file | No | Path is a file. | |
| bracket_non_empty | No | Path is non-empty. | |
| bracket_readable | No | Path is readable. | |
| bracket_symlink | No | Path is a symlink. | |
| bracket_writable | No | Path is writable. | |
| exit_code | No | Return exit code 1 when the expression is false. | |
| tokens | No | Expression tokens, optionally ending with ']'. |