pathchk
Validate path name components for portability by checking length, character set, and existence. Use before creating or accessing paths.
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 |
|---|---|---|---|
| raw | No | Write validation rows without a JSON envelope. | |
| paths | Yes | Path strings to validate. | |
| portable | No | Require portable POSIX filename characters. | |
| exit_code | No | Return exit code 1 when any path is invalid. | |
| max_path_length | No | Maximum path string length. | |
| max_component_length | No | Maximum path component length. |