Util
The Scar::Util
module provides some useful methods.
File Handling
These methods are supposed to help writing files to a local user directory.
Before using any of them, set the subdirectory inside the user directory (windows: %appdata%\<subdir>
| linux: ~/.local/share/<dir>
) by calling Scar::Util.dir = <dir>
.
After that, you can write and read files with the following methods:
write_file(name : String, content : String)
write_file_bytes(name : String, content : Bytes)
read_file(name) => String
read_file_bytes(name) => Bytes
Last updated