Skip to main content

Module paths

Module paths 

Source
Expand description

Path utilities for backup-mirroring, timestamp suffixing, and cross-platform tilde expansion.

Structs§

YuiIgnoreStack
Stack of .yuiignore matchers 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 .yuiignore overrides 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_tilde but with an explicit home path — used in tests to avoid touching the process-wide HOME env var.
home_dir
$HOME (Unix) or $USERPROFILE (Windows), or None if neither is set.
is_ignored_at
One-shot .yuiignore test for a single path under source.
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/home mounts directly without symlinking). Anything else is treated as relative to source (the dotfiles repo root) — the historical default.
resolve_mount_src_with
resolve_mount_src with an explicit home — used in tests so we don’t mutate the process-wide HOME env var (which races with parallel tests). Production code goes through resolve_mount_src.
source_walker
Build a source-tree walker that skips repo plumbing.