Expand description
Path utilities for backup-mirroring, timestamp suffixing, and cross-platform tilde expansion.
Structs§
- YuiIgnore
Stack - Stack of
.yuiignorematchers for manual recursive walks. Each frame remembers the directory it was loaded from + the parsed matcher; testing a path walks innermost → outermost so a deeper.yuiignoreoverrides a shallower one (gitignore semantics).
Functions§
- append_
timestamp - Append a timestamp before the extension.
- expand_
tilde - Expand a leading
~or~/...to the user’s home directory. - expand_
tilde_ with - Same as
expand_tildebut with an explicit home path — used in tests to avoid touching the process-wideHOMEenv var. - home_
dir $HOME(Unix) or$USERPROFILE(Windows), orNoneif neither is set.- is_
ignored_ at - One-shot
.yuiignoretest for a single path undersource. - mirror_
into_ backup - Mirror an absolute target path into a backup directory, dropping the drive colon on Windows so the path is filesystem-safe.
- resolve_
mount_ src - Resolve a
[[mount.entry]] src = "..."value to an absolute path.~and~/...expand to the home directory; absolute inputs are returned verbatim (so a private clone at~/.dotfiles-private/homemounts directly without symlinking). Anything else is treated as relative tosource(the dotfiles repo root) — the historical default. - resolve_
mount_ src_ with resolve_mount_srcwith an explicit home — used in tests so we don’t mutate the process-wideHOMEenv var (which races with parallel tests). Production code goes throughresolve_mount_src.- source_
walker - Build a source-tree walker that skips repo plumbing.