cocos2d-x-3.12 removeDirectory 安卓无效

removeDirectory安卓无效 bool FileUtils::removeDirectory(const std::string& path)
{
// FIXME: Why using subclassing? an interface probably will be better
// to support different OS
// FileUtils::removeDirectory is subclassed on iOS/tvOS
// and system() is not available on tvOS
#if !defined(CC_PLATFORM_IOS)
if (path.size() > 0 && path[path.size() - 1] != ‘/’)
{
CCLOGERROR(“Fail to remove directory, path must terminate with ‘/’: %s”, path.c_str());
return false;
}

std::string command = "rm -r ";
// Path may include space.
command += "\"" + path + "\"";
if (system(command.c_str()) >= 0)
    return true;
else

#endif
return false;
} #if !defined(CC_PLATFORM_IOS) 是否应该 #if (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)?