# Module /glue/fs-util

High-level directory tree copying, filename sanitization, and parent directory initialization.

```tangu
(use /glue/fs-util)
```

## Functions & symbols

### copy-directory

`(copy-directory source-path target-path)`

Recursively copies a directory tree from `source-path` to `target-path`, ensuring parent directories exist.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `source-path` | `Any` | no | — |
| `target-path` | `Any` | no | — |

### copy-file

`(copy-file source-path target-path)`

Copies `source-path` to `target-path`, creating missing parent directories first.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `source-path` | `Any` | no | — |
| `target-path` | `Any` | no | — |

### ensure-dirname

`(ensure-dirname path)`

Ensures the parent directory exists, returns the input for convenience.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `path` | `Any` | no | — |

### sanitize-path

`(sanitize-path path)`

Sanitizes a string for use in filesystem paths or slugs by replacing whitespace/colons with hyphens and stripping punctuation.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `path` | `Any` | no | — |
