mirror of https://github.com/bjornbytes/lovr.git
Add missing bindings for lovr.filesystem.createDirectory;
This commit is contained in:
parent
0d552a0f0c
commit
6695be5eb8
|
@ -114,6 +114,12 @@ int l_lovrFilesystemAppend(lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int l_lovrFilesystemCreateDirectory(lua_State* L) {
|
||||
const char* path = luaL_checkstring(L, 1);
|
||||
lua_pushboolean(L, !lovrFilesystemCreateDirectory(path));
|
||||
return 1;
|
||||
}
|
||||
|
||||
int l_lovrFilesystemExists(lua_State* L) {
|
||||
const char* path = luaL_checkstring(L, 1);
|
||||
lua_pushboolean(L, lovrFilesystemExists(path));
|
||||
|
@ -308,6 +314,7 @@ int l_lovrFilesystemWrite(lua_State* L) {
|
|||
|
||||
const luaL_Reg lovrFilesystem[] = {
|
||||
{ "append", l_lovrFilesystemAppend },
|
||||
{ "createDirectory", l_lovrFilesystemCreateDirectory },
|
||||
{ "exists", l_lovrFilesystemExists },
|
||||
{ "getAppdataDirectory", l_lovrFilesystemGetAppdataDirectory },
|
||||
{ "getDirectoryItems", l_lovrFilesystemGetDirectoryItems },
|
||||
|
|
|
@ -16,6 +16,7 @@ typedef struct {
|
|||
|
||||
void lovrFilesystemInit(const char* arg0, const char* arg1);
|
||||
void lovrFilesystemDestroy();
|
||||
int lovrFilesystemCreateDirectory(const char* path);
|
||||
int lovrFilesystemExists(const char* path);
|
||||
int lovrFilesystemGetAppdataDirectory(char* dest, unsigned int size);
|
||||
void lovrFilesystemGetDirectoryItems(const char* path, getDirectoryItemsCallback callback, void* userdata);
|
||||
|
|
Loading…
Reference in New Issue