[
Assess file path attributes including existence, type, and permissions. Provides JSON output with result and exit code for use in conditional script logic.
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 |
|---|---|---|---|
| tokens | No | Expression tokens, optionally ending with ']'. | |
| exit_code | No | Return exit code 1 when the expression is false. | |
| bracket_file | No | Path is a file. | |
| bracket_exists | No | Path exists. | |
| bracket_symlink | No | Path is a symlink. | |
| bracket_readable | No | Path is readable. | |
| bracket_writable | No | Path is writable. | |
| bracket_directory | No | Path is a directory. | |
| bracket_non_empty | No | Path is non-empty. | |
| bracket_executable | No | Path is executable. |