1.8 KiB
Executable File
1.8 KiB
Executable File
A rule that writes a UTF-8 encoded text file from user-specified contents.
native.genrule() is sometimes used to create a text file. The 'write_file' and macro does this with a simpler interface than genrule.
The rules generated by the macro do not use Bash or any other shell to write the file. Instead they use Starlark's built-in file writing action (ctx.actions.write).
write_file
write_file(name, out, content, is_executable, newline, kwargs)
Creates a UTF-8 encoded text file.
PARAMETERS