xref: /aosp_15_r20/external/bazel-skylib/docs/select_file_doc.md (revision bcb5dc7965af6ee42bf2f21341a2ec00233a8c8a)
1*bcb5dc79SHONG Yifan<!-- Generated with Stardoc: http://skydoc.bazel.build -->
2*bcb5dc79SHONG Yifan
3*bcb5dc79SHONG Yifanselect_file() build rule implementation.
4*bcb5dc79SHONG Yifan
5*bcb5dc79SHONG YifanSelects a single file from the outputs of a target by given relative path.
6*bcb5dc79SHONG Yifan
7*bcb5dc79SHONG Yifan<a id="select_file"></a>
8*bcb5dc79SHONG Yifan
9*bcb5dc79SHONG Yifan## select_file
10*bcb5dc79SHONG Yifan
11*bcb5dc79SHONG Yifan<pre>
12*bcb5dc79SHONG Yifanselect_file(<a href="#select_file-name">name</a>, <a href="#select_file-srcs">srcs</a>, <a href="#select_file-subpath">subpath</a>)
13*bcb5dc79SHONG Yifan</pre>
14*bcb5dc79SHONG Yifan
15*bcb5dc79SHONG YifanSelects a single file from the outputs of a target by given relative path
16*bcb5dc79SHONG Yifan
17*bcb5dc79SHONG Yifan**ATTRIBUTES**
18*bcb5dc79SHONG Yifan
19*bcb5dc79SHONG Yifan
20*bcb5dc79SHONG Yifan| Name  | Description | Type | Mandatory | Default |
21*bcb5dc79SHONG Yifan| :------------- | :------------- | :------------- | :------------- | :------------- |
22*bcb5dc79SHONG Yifan| <a id="select_file-name"></a>name |  A unique name for this target.   | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required |  |
23*bcb5dc79SHONG Yifan| <a id="select_file-srcs"></a>srcs |  The target producing the file among other outputs   | <a href="https://bazel.build/concepts/labels">Label</a> | required |  |
24*bcb5dc79SHONG Yifan| <a id="select_file-subpath"></a>subpath |  Relative path to the file   | String | required |  |
25*bcb5dc79SHONG Yifan
26*bcb5dc79SHONG Yifan
27