sourceTree and writes all values into the
For example, to copy the values from a YAML file into individual files:
$ cat greetings.yaml
Alice: Hello, Alice.
Bob: Hello, Bob.
Carol: Hello, Carol.
$ ori @copy greetings.yaml, @files/greetings
$ ls greetings
Alice Bob Carol
$ cat greetings/Alice
files/greetings argument indicates that
copy should copy the input YAML tree to a file system tree under a folder named
greetings. As a result, the key/value pairs in the YAML file are now individual files in a
targetTree must support a
set method. The two types of trees defined in the async-tree library that provides such support are ObjectTree and FileTree. Only the latter provides persistent effects, so
copy is typically used to copy the values from the source tree into file system files.