dirname
Extract the parent directory from file paths by stripping the last component. Returns the directory path in JSON.
Instructions
Return the parent directory portion of file paths, stripping the final component. Read-only, no side effects. Returns JSON with the directory path. Use to extract directory prefixes from full paths. Not for extracting the filename — use 'basename' for the final component. See also 'basename', 'realpath'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Paths to transform. | |
| raw | No | Write one dirname per line without a JSON envelope. |