Classes | |
class | lua_filestream |
Functions | |
static bool | resolve_filename (std::string &filename, const std::string ¤tdir) |
resolves filename where currentdir is the current directory, note that currentdir is no absolute directory More... | |
int | intf_have_file (lua_State *L) |
Checks if a file exists (not necessarily a Lua script). More... | |
int | intf_read_file (lua_State *L) |
Checks if a file exists (not necessarily a Lua script). More... | |
int | load_file (lua_State *L) |
Loads a Lua file and pushes the contents on the stack. More... | |
Checks if a file exists (not necessarily a Lua script).
Definition at line 95 of file lua_fileops.cpp.
References filesystem::get_wml_location(), lua_pushboolean(), and luaL_checkstring.
Referenced by lua_kernel_base::lua_kernel_base().
Checks if a file exists (not necessarily a Lua script).
Definition at line 108 of file lua_fileops.cpp.
References filesystem::directory_name(), filesystem::get_wml_location(), filesystem::istream_file(), lua_getinfo(), lua_getstack(), luaL_addsize, luaL_argerror(), luaL_buffinit(), luaL_checkstring, luaL_error(), luaL_prepbuffsize(), luaL_pushresult(), resolve_filename(), and lua_Debug::source.
Referenced by lua_kernel_base::lua_kernel_base().
Loads a Lua file and pushes the contents on the stack.
Definition at line 197 of file lua_fileops.cpp.
References filesystem::directory_name(), filesystem::get_wml_location(), lua_error(), lua_getinfo(), lua_getstack(), lua_fileops::lua_filestream::lua_loadfile(), lua_remove(), luaL_argerror(), luaL_checkstring, resolve_filename(), and lua_Debug::source.
Referenced by lua_kernel_base::intf_dofile(), lua_kernel_base::intf_require(), and application_lua_kernel::load_script_from_file().
|
static |
resolves filename where currentdir is the current directory, note that currentdir is no absolute directory
Definition at line 45 of file lua_fileops.cpp.
References gui2::event::find(), and pos.
Referenced by intf_read_file(), and load_file().