World Executor · Roblox VM

Filesystem

Read, write, and manage files and folders relative to Nexomia's workspace, including Luau loaders and asset URL helpers.

Overview

Every path here is relative to the client's workspace folder and cannot escape it. The Workspace & Auto-Execute chapter covers the folder layout; this one is the function surface.

The everyday four
if not isfolder("config") then
    makefolder("config")
end

writefile("config/settings.json", game:GetService("HttpService"):JSONEncode({ enabled = true }))
print(readfile("config/settings.json"))

for _, path in ipairs(listfiles("config")) do
    print(path, isfile(path))
end

Check before you read

readfile on a path that does not exist errors. isfile(path) first, or wrap it in a pcall — on an auto-execute script that difference is between a clean join and an error on every single one.

Reading

Writing

Folders

Loading

Assets

getcustomasset turns a workspace file into a rbxasset:// URL the Roblox renderer accepts, which is how a local image reaches an ImageLabel or a Drawing object.

Removing