WardrikWorkspace. Path
(wardrik_workspace v0.1.0-rc.1)
Copy Markdown
Paths and globs within a workspace.
A path names a file, as notes/today.md. normalize/1 drops . segments and repeated slashes.
It refuses a path that:
- starts with
/or~ - contains a
..segment - contains a NUL or a backslash
- is longer than 1,024 bytes
Folders are just path prefixes, so there's nothing to create.
A glob matches whole paths:
*- any characters within one folder.?- one character.**- any characters across folders.
For example, notes/*.md matches the Markdown files in notes, and **/*.md matches all of
them.
Summary
Functions
Compiles glob to a regular expression.
Returns whether glob matches path.
Normalises path. Returns {:error, reason} if it isn't a valid path.
Functions
Compiles glob to a regular expression.
Returns whether glob matches path.
Normalises path. Returns {:error, reason} if it isn't a valid path.