A rule that copies source files to the output tree. This rule uses a Bash command (diff) on Linux/macOS/non-Windows, and a cmd.exe command (fc.exe) on Windows (no Bash is required). Originally authored in rules_nodejs https://github.com/bazelbuild/rules_nodejs/blob/8b5d27400db51e7027fe95ae413eeabea4856f8e/internal/common/copy_to_bin.bzl ## copy_file_to_bin_action
copy_file_to_bin_action(ctx, file, is_windows)Factory function that creates an action to copy a file to the output tree. File are copied to the same workspace-relative path. The resulting files is returned. If the file passed in is already in the output tree is then it is returned without a copy action. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | ctx | The rule context. | none | | file | The file to copy. | none | | is_windows | Deprecated and unused |
None
|
**RETURNS**
A File in the output tree.
## copy_files_to_bin_actions
copy_files_to_bin_actions(ctx, files, is_windows)Factory function that creates actions to copy files to the output tree. Files are copied to the same workspace-relative path. The resulting list of files is returned. If a file passed in is already in the output tree is then it is added directly to the result without a copy action. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | ctx | The rule context. | none | | files | List of File objects. | none | | is_windows | Deprecated and unused |
None
|
**RETURNS**
List of File objects in the output tree.
## copy_to_bin
copy_to_bin(name, srcs, kwargs)Copies a source file to output tree at the same workspace-relative path. e.g. `
visibility
| none |