aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/io/ifilesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/lua_api/io/ifilesystem.cpp')
-rw-r--r--src/client/lua_api/io/ifilesystem.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/client/lua_api/io/ifilesystem.cpp b/src/client/lua_api/io/ifilesystem.cpp
index 9d12b22..252b61b 100644
--- a/src/client/lua_api/io/ifilesystem.cpp
+++ b/src/client/lua_api/io/ifilesystem.cpp
@@ -1,11 +1,19 @@
#include "ifilesystem.hpp"
+/***
+@module io
+*/
using namespace irr;
using namespace io;
extern IrrlichtDevice* device;
+/***
+A list of files in the current direcotry.
+@function list()
+@treturn array The files and directories in the current directory.
+*/
// io.list()
int listfilesin(lua_State *L){
IFileSystem *fs = device->getFileSystem();
@@ -26,6 +34,11 @@ int listfilesin(lua_State *L){
return 1;
}
+/***
+Changes the current directory of the program
+@function cd(dir)
+@tparam string dir The directory to change to
+*/
// io.cd("directory")
int changedirectory(lua_State *L){
IFileSystem *fs = device->getFileSystem();
@@ -35,6 +48,15 @@ int changedirectory(lua_State *L){
return 0;
}
+/***
+Logs some text with Irrlicht.
+`level` may be any of:
+io.LOG_DEBUG, io.LOG_INFO, io.LOG_WARN, io.LOG_ERROR, io.LOG_NONE
+@function log(text,level[,hint])
+@tparam string text The text to log
+@tparam log_level_enum level The log level
+@tparam string hint An optional hint to supply with the log
+*/
// io.log("text",level)
// io.log("text",level[,"hint"])
int logmessage(lua_State *L){
@@ -57,6 +79,13 @@ int logmessage(lua_State *L){
return 0;
}
+/***
+Sets what output gets logged, and what gets ignored.
+level may be any of:
+io.LOG_DEBUG, io.LOG_INFO, io.LOG_WARN, io.LOG_ERROR, io.LOG_NONE
+@function set_log_level(level)
+@tparam number level the minimul level of log to capture
+*/
//io.set_log_level(level)
int setloglevel(lua_State *L){
ILogger *log = device->getLogger();