MCPcopy Create free account
hub / github.com/DavidColson/Polybox / VfsRemove

Function VfsRemove

source/virtual_filesystem.cpp:104–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102// ***********************************************************************
103
104int 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

Callers

nothing calls this directly

Calls 2

VFSPathToRealPathFunction · 0.85
StringClass · 0.70

Tested by

no test coverage detected