Graphite  Version 3
An experimental 3D geometry processing program
lua_io.h File Reference

LUA bindings for geogram IO and filesystem functions. More...

#include <geogram/api/defs.h>
#include <geogram/third_party/lua/lua.h>

Go to the source code of this file.

Functions

void init_lua_io (lua_State *L)
 Initializes LUA filesystem operations. More...
 
void register_embedded_lua_file (const char *filename, const char *data)
 Registers an "embedded file", i.e. a static string with some LUA sources in it. More...
 
void get_embedded_lua_file (const char *filename, const char **data)
 Gets an "embedded file" by its filename. More...
 

Detailed Description

LUA bindings for geogram IO and filesystem functions.

Definition in file lua_io.h.

Function Documentation

◆ get_embedded_lua_file()

void get_embedded_lua_file ( const char *  filename,
const char **  data 
)

Gets an "embedded file" by its filename.

Parameters
[in]filenamethe name that was previously used to register the file, using register_embedded_file()
[out]dataa pointer to the static string with the "file" data, or nullptr if no file was registered with that name.

◆ init_lua_io()

void init_lua_io ( lua_State *  L)

Initializes LUA filesystem operations.

Parameters
[in]La pointer to the LUA state.

◆ register_embedded_lua_file()

void register_embedded_lua_file ( const char *  filename,
const char *  data 
)

Registers an "embedded file", i.e. a static string with some LUA sources in it.

Parameters
[in]filenamethe name of the "file" to be used to retreive the data.
[in]datathe static string with the sources associated with the file.