| LUAL_LOADFILE(3) | Library Functions Manual | LUAL_LOADFILE(3) |
luaL_loadfile —
loads a file as a Lua chunk, function indicator [-0, +1,
m]
#include
<lauxlib.h>
int
luaL_loadfile(lua_State
*L, const char
*filename);
luaL_loadfile()
loads a file as a Lua chunk. This function uses
lua_load(3) to load the chunk in the file named
filename. If filename is NULL,
then it loads from the standard input. The first line in the file is ignored
if it starts with a
#.
As lua_load(3), this function only loads the chunk; it does not run it.
This function returns the same results as
lua_load(3), but it has an extra error code
LUA_ERRFILE if it cannot open/read the file.
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The luaL_loadfile() manual page is based
on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
| July 24, 2022 | Debian |