Files and links
Two calls put files where they belong. One copies, one links, and the difference matters.
niwa.file
niwa.file(target: string, options: { source: string?, content: (string | Rendered)?, mode: string? }) -> ResultPut a file at target. niwa copies; it never symlinks, so an edit you make on the machine is yours to keep and pull brings it home. A directory source fans out to one resource per file. mode is a string of octal digits, for example "600".
niwa.link
niwa.link(target: string, options: { to: string }) -> ResultMake a symlink at target. This is the call for directories you develop in, where a copy would be the wrong thing.
Next
- Manage dotfiles — copy files, link files, render templates, and know which is which
- System settings — manage macOS system settings and defaults
