unigine 判断文件或文件夹 判断是否存在

unigine版本2.7.2

unigine中文件相关的有FileSystem,Dir,File 等类。由于具有跨平台性,应该优先使用unigine内部的工具类

判断文件是否存在 及判断是否是文件:

1、Dir::isFile(char*path ); //static 类型
2、FileSystem::get()->isFileExist(char*path)

判断文件夹是否存在,及判断是否是文件夹:

DirPtr dir = Dir::create(char*path);
if(dir.get() && dir->isOpened())
{
//dir exit;
}

猜你喜欢

转载自blog.csdn.net/qiushangren/article/details/87806463