File is passed to an Args object without using a map_each function, it is converted to a string by taking the value of its path field.
Members
- basename
- dirname
- extension
- is_directory
- is_source
- is_symlink
- owner
- path
- root
- short_path
- tree_relative_path
basename
dirname
extension
is_directory
is_source
is_symlink
owner
None.
path
short_path. The root may be empty, which it usually is for non-generated files. For generated files it usually contains a configuration-specific path fragment that encodes things like the target CPU architecture that was used while building said file.
Note that for files in external repositories, short_path reflects the runfiles tree path (prefixed with ../<repo_name>/) rather than the root-relative execution path (prefixed with external/<repo_name>/), so concatenating File.root.path and File.short_path does not yield File.path.
root
short_path
../<repo_name>/ (the legacy runfiles path relative to the main repository’s runfiles directory). Note that because it starts with ../, it cannot simply be joined to RUNFILES_DIR, nor used with runfiles libraries or rlocation without stripping the leading ../.
tree_relative_path
tree_relative_path is only available for expanded files of a directory in an action command, i.e. Args.add_all(). For other types of files, it is an error to access this field.