Filesystem
Store settings and other script data in the Kawaii workspace. Read or replace file contents, append logs, and manage folders using workspace-relative paths.
Functions
appendfileAdd bytes to the end of a workspace file. It is a natural fit for a running log because existing entries stay in place.
delfileRemove one workspace file when it is no longer needed. A missing file is ignored, which makes cleanup safe to repeat.
delfolderDelete a workspace folder and its descendants. Reserve it for a directory your script owns, such as a disposable cache or temporary export tree.
dofileLoad and run a Luau file from the workspace in one call. Choose it when the file is a script to execute, not data to parse.
getcustomassetCopy a workspace file into Kawaii's local asset store and get a Roblox content URI for it. Set that URI on a Roblox property that accepts image or other asset content.
isfileAsk whether a workspace path names an existing file. It is a quick way to make optional data truly optional before calling readfile.
isfolderAsk whether a workspace path names an existing directory. Check it before listing a user-selected cache or export folder.
listfilesList the immediate children of a workspace directory. The returned paths can be handed directly to isfile, readfile, or the other workspace functions.
loadfileCompile a workspace Luau file without running it yet. Keep the returned function when execution belongs at a later point in your script.
makefolderCreate a workspace directory for related files. Kawaii creates missing parents as well, so one call can prepare a nested destination.
readfileRead a workspace file as a Luau string. Strings can hold arbitrary bytes, so the same call can load settings text or an image you plan to pass to another API.
writefileSave a string to a workspace file, creating it when necessary. Writing an existing file replaces its contents, which suits settings snapshots and generated exports.