| 147 | // *********************************************************************** |
| 148 | |
| 149 | int VfsMove(lua_State* L) { |
| 150 | u64 fromLen; |
| 151 | const char* from = luaL_checklstring(L, 1, &fromLen); |
| 152 | String realFrom; |
| 153 | if (!VFSPathToRealPath(String(from), realFrom, g_pArenaFrame)) { |
| 154 | luaL_error(L, "Filepath not in a valid mount point", from); |
| 155 | lua_pushboolean(L, false); |
| 156 | return 1; |
| 157 | } |
| 158 | |
| 159 | u64 toLen; |
| 160 | const char* to = luaL_checklstring(L, 2, &toLen); |
| 161 | String realTo; |
| 162 | if (!VFSPathToRealPath(String(to), realTo, g_pArenaFrame)) { |
| 163 | luaL_error(L, "Filepath not in a valid mount point", to); |
| 164 | lua_pushboolean(L, false); |
| 165 | return 1; |
| 166 | } |
| 167 | |
| 168 | |
| 169 | bool result = MoveFile(realFrom, realTo); |
| 170 | lua_pushboolean(L, result); |
| 171 | return 1; |
| 172 | } |
| 173 | // *********************************************************************** |
| 174 | |
| 175 | void BindFileSystem(lua_State* L) { |
nothing calls this directly
no test coverage detected