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

Function VfsMakeDirectory

source/virtual_filesystem.cpp:85–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83// ***********************************************************************
84
85int 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

Callers

nothing calls this directly

Calls 2

VFSPathToRealPathFunction · 0.85
StringClass · 0.70

Tested by

no test coverage detected