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.
- source_
walker - Build a source-tree walker that skips repo plumbing.