Copy files and directories to an output directory ## copy_to_directory
copy_to_directory(name, srcs, root_paths, include_external_repositories, exclude_prefixes, replace_prefixes, kwargs)Copies files and directories to an output directory. Files and directories can be arranged as needed in the output directory using the `root_paths`, `exclude_prefixes` and `replace_prefixes` attributes. **PARAMETERS** | Name | Description | Default Value | | :------------- | :------------- | :------------- | | name | A unique name for this target. | none | | srcs | Files and/or directories or targets that provide DirectoryPathInfo to copy into the output directory. |
[]
|
| root_paths | List of paths that are roots in the output directory./
) should be used as path separators. Partial matches on the final path segment of a root path against the corresponding segment in the full workspace relative path of a file are not matched.None
|
| include_external_repositories | List of external repository names to include in the output directory.@external_repo//path/to:file
to path/to/file
within the output directory. copy_to_directory( name = "dir", include_external_repositories = ["external_repo"], srcs = ["@external_repo//path/to:file"], )
root_paths
, exclude_prefixes
and replace_prefixes
in the same way as files form the main repository. | []
|
| exclude_prefixes | List of path prefixes to exclude from output directory.[]
|
| replace_prefixes | Map of paths prefixes to replace in the output directory path when copying files./
) should be used as path separators. The final path segment of the key can be a partial match in the corresponding segment of the output directory path.{}
|
| kwargs | Other common named parameters such as tags
or visibility
| none |