File.append
$file.append($dataListOrString) -> self
Description
Append the given data to the end of the file.
If the file does not already exist, it will be created.
If the data is a List, it will be joined by newlines \n
.
$fruitFile = file'files:/fruit.txt' // Single string $fruitFile.append('apple\n') $fruitFile.append('orange\n') // List of lines $fruitFile.append(['banana', 'pear']) $fruitFile.read() // apple // orange // banana // pear