I figured out if I add a folder to file system:
Code: Select all
g_smgr->getFileSystem()->addFileArchive("data", true, false, io::EFAT_FOLDER);
Code: Select all
ITexture* wrong_one = driver->getTexture("a.png");
Code: Select all
s32 binary_search(const T& element) const
{
if (is_sorted)
return binary_search(element, 0, used-1);
else
return linear_search(element);
}Code: Select all
stringc full_path;
IFileSystem* fs = smgr->getFileSystem();
path p = fs->getWorkingDirectory();
p += "/";
p += file;
if (fs->existFile(p))
{
full_path = file;
}
else
{
int index;
for (int i = 0; i < fs->getFileArchiveCount(); i++)
{
if ((index = fs->getFileArchive(i)->getFileList()->findFile(file)) > -1)
{
full_path = fs->getFileArchive(i)->getFileList()->getPath().c_str();
full_path += file;
break;
}
}
}
return full_path;