AcediaDocumentation

Filesystem

Workspace files, directories, assets, dialogs and partial exports.

All paths in this group stay inside Acedia's profile-owned workspace. Read and write calls handle byte strings; dialogs select workspace items in game.

Write and read a file

makefolder("examples")
writefile("examples/note.txt", "first line\n")
appendfile("examples/note.txt", "second line\n")
print(readfile("examples/note.txt"))

makefolder creates missing parents and succeeds if the folder already exists. listfiles returns direct children as workspace-relative paths.

Path rules

  • Paths cannot escape the workspace using .., an absolute path, a device path, or alternate-stream syntax.
  • listfiles(".") and listfiles("") select the workspace root.
  • loadfile rejects .. anywhere in the supplied name and limits input to 64 MiB.
  • delfolder removes an entire directory tree, but refuses to delete the workspace root.

Blocked file types: Writes to potentially executable or container files are blocked. These include: .exe, .com, .scr, .pif, .cpl, .msc, .bat, .cmd, .ps1, .psd1, .vbs, .vbe, .js, .jse, .wsf, .wsh, .hta, .scf, .lnk, .zip, .rar, .7z, .cab, .iso, .img, .xml, .msi, .msp, .reg, .inf, and .url.

File pickers such as openfiledialog return nil on cancellation. getcustomasset returns an asset URI, not raw image bytes. For saved Instance trees, saveinstance writes a partial .rbxmx export; see partial exports.

Functions

FunctionPurpose
readfileReads a workspace file as a binary-safe string.
isfileChecks whether a workspace path is a file.
isfolderChecks whether a workspace path is a directory.
makefolderCreates a workspace directory.
delfileDeletes a workspace file.
renamefileRenames or moves a workspace file.
getfilesizeReturns the size of a workspace file in bytes.
delfolderDeletes a workspace folder.
listfilesLists immediate entries beneath a workspace directory.
getcustomassetCopies a workspace asset into the engine content path and returns its asset URI.
writefileCreates or replaces a workspace file.
appendfileAppends bytes to a workspace file.
loadfileCompiles a workspace file without executing it.
dofileCompiles and executes a workspace Luau file.
saveinstanceWrites a partial Instance-tree export to an RBXMX file.
openfiledialogOpens an in-game workspace picker for one file.
openfilesdialogOpens an in-game workspace picker for multiple files.
openfolderdialogOpens an in-game workspace picker for a folder.
savefiledialogSelects a workspace folder and prepares a file with a suggested name.

On this page