Skip to content

Dirs ​

Reference for the dirs API.

WARNING

Paths are limited to the Lexis folder, trying to use a path in another directory will fail.

Functions ​

dirs.list ​

Returns a list of files in the directory.

lua
---@param path string
---@param extension? string
function dirs.list(path, extension?): string[]

dirs.scan ​

Returns a list of directories in the directory.

lua
---@param path string
function dirs.scan(path): string[]

dirs.exists ​

If a directory exists.

lua
---@param path string
function dirs.exists(path): bool

dirs.remove ​

Deletes a directory.

lua
---@param path string
function dirs.remove(path): bool

dirs.create ​

Creates a directory.

lua
---@param path string
function dirs.create(path): bool