Open appendfileOpen deletefileOpen deletefolderOpen dofileOpen getcustomassetOpen isfileOpen isfolderOpen listfilesOpen loadfileOpen makefolderOpen openfiledialogOpen readfileOpen writefile

Reference

Filesystem

Read and write files in the workspace folder.

33 functions
FunctionSummary
appendfileappend_fileAppends bytes to a workspace file, creating the file when needed.
appendfileasyncAppends bytes to a workspace file.
delfiledeletefiledel_fileDeletes one workspace file.
delfolderdeletefolderdel_folderRemoves a workspace directory and its contents.
dofiledo_fileCompiles and runs a workspace Luau file, returning its results.
getcustomassetgetsynassetget_custom_assetRegisters a workspace file as an asset address usable by the game.
getfileextensionReturns a path's extension without the dot.
getfilesizeReturns the size of a workspace file.
isfileis_fileTests whether a workspace path names a regular file.
isfolderis_folderTests whether a workspace path names a directory.
item:AppendAdds bytes to the end of the selected file.
item:DeleteDeletes the selected item.
item:GetNameReturns the display name of the chosen file or folder.
item:IsFileReports whether the chosen item represents a file.
item:IsFolderReports whether the chosen item represents a folder.
item:ListLists children of the selected folder as new dialog items.
item:MakeFolderCreates one child folder beneath the selected folder.
item:ReadReads the bytes of the chosen file.
item:WriteReplaces the selected file’s contents.
listfileslist_filesLists the immediate files and directories inside a workspace directory.
loadfileload_fileReads and compiles a workspace Luau file without executing it.
loadfileasyncCompiles a workspace file without executing it.
makefoldermake_folderCreates a folder inside the workspace.
openfiledialogAsks the user to select one file.
openfilesdialogAsks the user to select multiple files.
openfolderdialogAsks the user to select one folder.
readfileread_fileReads a workspace file as bytes.
readfileasyncReads the complete contents of a workspace file.
renamefilemovefileMoves a workspace file to a new path.
savefiledialogAsks the user where to save the supplied bytes, then writes them to the chosen file.
writecustomassetWrites a file and returns the asset id for it in one call.
writefilewrite_fileCreates or replaces a workspace file.
writefileasyncCreates or replaces a workspace file.