Adds item (lines, unindented, the first starting with - ) first in the
top-level models: list of a YAML file, each line marked # pai setup.
Starts the list when there is none, and the file with head when it is
empty. An entry pai added before is replaced.
Parameters
file: string
text: string|null
item: string[]
head: string[] = []
Returns string
Throws
CliErrorsetup_unreadable when the file indents with tabs or writes the list on one line.
Adds
item(lines, unindented, the first starting with-) first in the top-levelmodels:list of a YAML file, each line marked# pai setup. Starts the list when there is none, and the file withheadwhen it is empty. An entry pai added before is replaced.