Writes a yaml file in the current working directory from an Object or a String. It uses SnakeYAML as YAML processor. The call will fail if the file already exists.
Fields:file
:
Mandatory path to a file in the workspace to write the YAML datas to.
data
:
A Mandatory Object containing the data to be serialized.
Examples:
def amap = ['something': 'my datas',
'size': 3,
'isEmpty': false]
writeYaml file: 'datas.yaml', data: amap
def read = readYaml file: 'datas.yaml'
assert read.something == 'my datas'
assert read.size == 3
assert read.isEmpty == false