'system' is unavailable: not available on iOS

1.添加了:

#include ftw.h

int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW     *ftwbuf)

{

int rv = remove(fpath);

if (rv)

perror(fpath);

return rv;

}

2.替换

lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));

lua_pushinteger(L, nftw(luaL_optstring(L, 1, NULL), unlink_cb, 64, FTW_DEPTH | FTW_PHYS));

你可能感兴趣的:('system' is unavailable: not available on iOS)