| 102 | // *********************************************************************** |
| 103 | |
| 104 | int VfsRemove(lua_State* L) { |
| 105 | u64 filenameLen; |
| 106 | const char* filename = luaL_checklstring(L, 1, &filenameLen); |
| 107 | |
| 108 | String realFileName; |
| 109 | if (!VFSPathToRealPath(String(filename), realFileName, g_pArenaFrame)) { |
| 110 | luaL_error(L, "Filepath not in a valid mount point", filename); |
| 111 | lua_pushboolean(L, false); |
| 112 | return 1; |
| 113 | } |
| 114 | |
| 115 | bool result = RemoveFileOrDirectory(realFileName); |
| 116 | lua_pushboolean(L, result); |
| 117 | return 1; |
| 118 | } |
| 119 | |
| 120 | // *********************************************************************** |
| 121 |
nothing calls this directly
no test coverage detected