Skip to main content

Module write

Module write 

Source
Expand description

The one answer to “may cuno write this file”: every command that writes in the project asks here, so a rule found missing in one writer (a link written through, a hand-written file overwritten) is added once.

Enums§

Refusal
Why cuno does not write a file.

Functions§

absent
Whether cuno may create path as a new file (cuno init): only when nothing is there, not even a link (docs/en/specs/commands.md, “cuno init [path]”). The caller creates it so that it fails rather than write over one made since.
appendable
Whether cuno may add lines to the end of path, a file of the user’s (cuno init’s .gitignore): a file, not a link.
code
Whether cuno may rewrite path, a file of the package’s code (cuno fmt, cuno lint --fix): one ours accepts, that is a file and not a link (docs/en/specs/dev-tools.md, “Target files”).
generated
Whether cuno may write path, a file it generates (.clang-format, .clang-tidy): absent, or a file, not a link, whose first line is marker, as cuno writes it (docs/en/specs/dev-tools.md, “Configuration”).