Data & codecs4 exports
Raw Markdown/glue/fs-util
High-level directory tree copying, filename sanitization, and parent directory initialization.
Functions & symbols#
copy-directory#
function
Recursively copies a directory tree from `source-path` to `target-path`, ensuring parent directories exist.
| Parameter | Type | Optional | Description |
|---|---|---|---|
source-path | Any | required | — |
target-path | Any | required | — |
Returns:
Anycopy-file#
function
Copies `source-path` to `target-path`, creating missing parent directories first.
| Parameter | Type | Optional | Description |
|---|---|---|---|
source-path | Any | required | — |
target-path | Any | required | — |
Returns:
Anyensure-dirname#
function
Ensures the parent directory exists, returns the input for convenience.
| Parameter | Type | Optional | Description |
|---|---|---|---|
path | Any | required | — |
Returns:
Anysanitize-path#
function
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 | required | — |
Returns:
Any