appendfile
Also available as append_file
Adds text to the end of a file in the workspace folder, creating it if needed.
function appendfile(path: string, contents: string): ()
Read and write files in the workspace folder.
Also available as append_file
Adds text to the end of a file in the workspace folder, creating it if needed.
function appendfile(path: string, contents: string): ()
Also available as delfile del_file
Deletes a file from the workspace.
function delfile(path: string): ()
Also available as delfolder del_folder
Deletes a folder and everything inside it.
function delfolder(path: string): ()
Also available as do_file
Reads a Lua file from the workspace and runs it, returning whatever it returns.
Also available as getsynasset get_custom_asset
Turns a workspace file into an asset address the game can load, such as an image or sound.
function getcustomasset(path: string): string
Also available as is_file
Returns true if the path is a file.
function isfile(path: string): boolean
Also available as is_folder
Returns true if the path is a folder.
function isfolder(path: string): boolean
Also available as list_files
Returns the paths of the files and folders directly inside a folder.
function listfiles(path: string): { string }
Also available as load_file
Reads a Lua file from the workspace and compiles it into a function without running it. Returns nil and the error on a syntax error.
function loadfile<A...>(path: string): ((A...) -> any | nil, string?)
Also available as make_folder
Creates a folder in the workspace.
function makefolder(path: string): ()
Also available as openfilesdialog openfolderdialog savefiledialog item:Append item:Delete item:GetName item:IsFile item:IsFolder item:List item:MakeFolder item:Read item:Write
Lets you choose files or folders through a system dialog. The returned item has methods to read, write, append, list and delete only what you chose.
Also available as read_file
Reads a file from the workspace folder and returns its contents as a string.
function readfile(path: string): string
Also available as write_file
Writes a string to a file in the workspace folder, creating or replacing it.
function writefile(path: string, data: string): ()