Classes | |
class | lua_filestream |
Functions | |
static std::string | get_calling_file (lua_State *L) |
static bool | canonical_path (std::string &filename, const std::string ¤tdir) |
resolves filename to an absolute path More... | |
static bool | resolve_filename (std::string &filename, const std::string ¤tdir, std::string *rel=nullptr) |
resolves filename to an absolute path More... | |
int | intf_canonical_path (lua_State *L) |
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) |
Reads a file into a string, or a directory into a list of files therein. More... | |
int | load_file (lua_State *L) |
Loads a Lua file and pushes the contents on the stack. More... | |
int | luaW_open (lua_State *L) |
|
static |
resolves filename to an absolute path
Definition at line 104 of file lua_fileops.cpp.
References filename.
Referenced by intf_canonical_path(), and resolve_filename().
|
static |
Definition at line 78 of file lua_fileops.cpp.
References filesystem::directory_name().
Referenced by intf_canonical_path(), intf_have_file(), intf_read_file(), and load_file().
int lua_fileops::intf_canonical_path | ( | lua_State * | L | ) |
Definition at line 169 of file lua_fileops.cpp.
References canonical_path(), get_calling_file(), and lua_push().
Referenced by luaW_open().
int lua_fileops::intf_have_file | ( | lua_State * | L | ) |
Checks if a file exists (not necessarily a Lua script).
Definition at line 185 of file lua_fileops.cpp.
References get_calling_file(), filesystem::is_directory(), luaW_toboolean(), and resolve_filename().
Referenced by luaW_open().
int lua_fileops::intf_read_file | ( | lua_State * | L | ) |
Reads a file into a string, or a directory into a list of files therein.
Definition at line 203 of file lua_fileops.cpp.
References b, filesystem::default_blacklist, get_calling_file(), filesystem::get_files_in_dir(), filesystem::is_directory(), filesystem::istream_file(), lua_push(), p, filesystem::blacklist_pattern_list::remove_blacklisted_files_and_dirs(), resolve_filename(), and utf8::size().
Referenced by luaW_open().
int lua_fileops::load_file | ( | lua_State * | L | ) |
Loads a Lua file and pushes the contents on the stack.
Definition at line 293 of file lua_fileops.cpp.
References get_calling_file(), lua_fileops::lua_filestream::lua_loadfile(), p, and resolve_filename().
Referenced by lua_kernel_base::intf_dofile(), lua_kernel_base::intf_require(), and application_lua_kernel::load_script_from_file().
int lua_fileops::luaW_open | ( | lua_State * | L | ) |
Definition at line 317 of file lua_fileops.cpp.
References intf_canonical_path(), intf_get_image_size(), intf_have_asset(), intf_have_file(), intf_read_file(), and intf_resolve_asset().
Referenced by lua_kernel_base::lua_kernel_base().
|
static |
resolves filename to an absolute path
Definition at line 153 of file lua_fileops.cpp.
References canonical_path(), filename, filesystem::get_wml_location(), and p.
Referenced by intf_have_file(), intf_read_file(), and load_file().