LUAL_DOFILE(3) Library Functions Manual LUAL_DOFILE(3)

luaL_dofileloads and runs the given file, function indicator [-0, +?, m]

#include <lauxlib.h>

int
luaL_dofile(lua_State *L, const char *filename);

() loads and runs the given file. It is defined as the following macro:

(luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))

It returns 0 if there are no errors or 1 in case of errors.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The luaL_dofile() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 24, 2022 Debian