| 83 | // *********************************************************************** |
| 84 | |
| 85 | int VfsMakeDirectory(lua_State* L) { |
| 86 | u64 filenameLen; |
| 87 | const char* filename = luaL_checklstring(L, 1, &filenameLen); |
| 88 | bool makeAll = (bool)luaL_checkboolean(L, 2); |
| 89 | |
| 90 | String realFileName; |
| 91 | if (!VFSPathToRealPath(String(filename), realFileName, g_pArenaFrame)) { |
| 92 | luaL_error(L, "Filepath not in a valid mount point", filename); |
| 93 | lua_pushboolean(L, false); |
| 94 | return 1; |
| 95 | } |
| 96 | |
| 97 | bool result = MakeDirectory(realFileName, makeAll); |
| 98 | lua_pushboolean(L, result); |
| 99 | return 1; |
| 100 | } |
| 101 | |
| 102 | // *********************************************************************** |
| 103 |
nothing calls this directly
no test coverage detected