Documentation
¶
Overview ¶
Package copy provides primitives for seeding an env file by copying it from another location. Paths may be absolute, `~`-prefixed, or relative to a configured base directory (typically the main worktree root).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func File ¶
File copies src to dst atomically (via temp-file-then-rename), preserving src's permissions. If dst already exists it is replaced. Callers are responsible for deciding whether overwriting is allowed and for backing up the previous file if needed.
func ResolveSource ¶
ResolveSource turns a user-provided source path into an absolute path. Absolute paths are returned as-is (after Clean), `~`-prefixed paths are expanded against homeDir, and everything else is resolved relative to baseDir (typically the main worktree root).
homeDir may be empty; if so, `~`-prefixed paths return an error.
Types ¶
This section is empty.