2021-11-16 04:29:16 +00:00
|
|
|
# Load
|
|
|
|
|
2022-02-15 03:51:22 +00:00
|
|
|
The load operators allows you to load in content from another file.
|
2021-11-16 04:29:16 +00:00
|
|
|
|
|
|
|
Note that you can use string operators like `+` and `sub` to modify the value in the yaml file to a path that exists in your system.
|
|
|
|
|
2022-02-15 03:51:22 +00:00
|
|
|
You can load files of the following supported types:
|
|
|
|
|
|
|
|
|Format | Load Operator |
|
|
|
|
| --- | --- |
|
|
|
|
| Yaml | load |
|
|
|
|
| XML | load_xml |
|
|
|
|
| Properties | load_props |
|
|
|
|
| Plain String | load_str |
|
2022-02-22 22:40:05 +00:00
|
|
|
| Base64 | load_base64 |
|
2021-11-16 04:29:16 +00:00
|
|
|
|
2022-02-22 22:36:03 +00:00
|
|
|
## Samples files for tests:
|
|
|
|
|
|
|
|
### yaml
|
|
|
|
|
|
|
|
`../../examples/thing.yml`:
|
2021-11-16 04:29:16 +00:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
a: apple is included
|
|
|
|
b: cool
|
|
|
|
```
|
2022-02-22 22:36:03 +00:00
|
|
|
|
|
|
|
### xml
|
|
|
|
`small.xml`:
|
2022-02-15 03:51:22 +00:00
|
|
|
|
|
|
|
```xml
|
|
|
|
<this>is some xml</this>
|
|
|
|
```
|
|
|
|
|
2022-02-22 22:36:03 +00:00
|
|
|
### properties
|
|
|
|
`small.properties`:
|
2022-02-15 03:51:22 +00:00
|
|
|
|
|
|
|
```properties
|
|
|
|
this.is = a properties file
|
|
|
|
```
|
2022-02-22 22:36:03 +00:00
|
|
|
|
|
|
|
### base64
|
|
|
|
`base64.txt`:
|
|
|
|
```
|
|
|
|
bXkgc2VjcmV0IGNoaWxsaSByZWNpcGUgaXMuLi4u
|
|
|
|
```
|