Skip to content

Lua API

김시후 edited this page Nov 11, 2023 · 3 revisions

Lua API

An API for developing simple apps for Shuffle. For more complex apps, see the Developing apps with C++ document.

fs

exists

Using: fs.exists(path)

Return: Boolean (whether the path exists)

Check if the path exists.

list

Using: fs.list(path)

Return: List of files

Get the subfiles of path (path must be a directory)

isDir

Using: fs.isDir(path)

Return: Boolean (whether path is a directory)

Check if path is a directory.

isFile

Using: fs.isFile(path)

Return: Boolean (whether path is a file)

Check if path is a file.

mkDir

Using: fs.isFile(path)

Create a directory.

readFile

Using: fs.readFile(path)

Return: String (File content)

Read a file.

Clone this wiki locally