Documentation
¶
Index ¶
Constants ¶
const CryptSuffix = ".crypt"
CryptSuffix marks a repository file whose content is encrypted. It is appended to the dot_-encoded name and never appears in the home path.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pair ¶
Pair is a source→destination file mapping. For an encrypted file Src carries the CryptSuffix while Dst is the plain home path.
func Collect ¶
Collect walks dir recursively and returns Pairs mapping src→dst. Only files whose top-level path segment starts with dot_ are collected. The .git directory is always skipped. When skipProfiles is true, a top-level profiles directory is skipped as well; this is used when dir is the repository root so that profile overlays are not pulled into the base set. A file with the CryptSuffix maps to the same home path as its plain twin; both present in one layer is an error because there is no sane winner.
func FilterPairs ¶
FilterPairs returns only the pairs whose destination matches one of the given targets. Targets are interpreted as home-directory paths and may use a "~/" prefix or be bare dotfile names starting with ".". Returns an error if any target cannot be matched to a pair.