File Functions
Read File
<string> readfile(<string> path)
Reads the contents of the file located at path
and returns it. If the file does not exist, it errors.
Write File
<void> writefile(<string> filepath, <string> contents)
Writes contents
to the supplied filepath
.
Extensions that are not allowed: .exe, .scr, .bat, .com, .csh, .msi, .vb, .vbs, .vbe, .ws, .wsf, .wsh, .ps1, .psy.
Append File
<void> appendfile(<string> path, <string> content)
Appends content
to the file contents at path
. If the file does not exist, it errors.
Load File
<function> loadfile(<string> path)
Loads in the contents of a file as a chunk and returns it if compilation is successful. Otherwise, if an error has occured during compilation, nil followed by the error message will be returned.
List Files
<table> listfiles(<string> folder)
Returns a table of files in folder
.
Is File
<bool> isfile(<string> path)
Returns if path
is a file or not.
Is Folder
<bool> isfolder(<string> path)
Returns if path
is a folder or not.
Make Folder
<void> makefolder(<string> filepath)
Creates a new folder at filepath
.
Delete Folder
<void> delfolder(<string> path)
Deletes the folder in the supplied path
, if no folder exist errors.
Delete File
<void> delfile(<string> path)
Deletes the file in the supplied path
, if no file exist errors.