pathchk
Validate path components for portable filename compliance, checking length, character set, and existence. Returns validation results to verify paths before use.
Instructions
Validate path name components for portability (length, character set, existence). Read-only, no side effects. Returns JSON with validation result. Use to verify paths before creating or using them. Not for path resolution — use 'realpath' to resolve to absolute canonical form. See also 'realpath'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exit_code | No | Return exit code 1 when any path is invalid. | |
| max_component_length | No | Maximum path component length. | |
| max_path_length | No | Maximum path string length. | |
| paths | Yes | Path strings to validate. | |
| portable | No | Require portable POSIX filename characters. | |
| raw | No | Write validation rows without a JSON envelope. |