Version: v0.7.1 - Beta.  We welcome contributors & feedback.


File.write($filePath, $dataListOrString) -> false


Write the given data to a file.

If the file already exists, it will be overwritten.

The $filePath is relative to the data/files directory.

If the data is a List, it will be joined by newlines \n.

File.write('file.txt', 'line1\nline2\nline3')

File.write('file.txt', ['line1', 'line2', 'line3'])

See Also