we're using irrlicht engine within out two iPad Apps and since this morning I'm running into problems while trying to compile CFIleSystem.cpp.
Code: Select all
//! Creates an empty filelist
IFileList* CFileSystem::createEmptyFileList(const io::path& path, bool ignoreCase, bool ignorePaths)
{
return new CFileList(path, ignoreCase, ignorePaths);
}
//! determines if a file exists and would be able to be opened.
bool CFileSystem::existFile(const io::path& filename) const
{
for (u32 i=0; i < FileArchives.size(); ++i)
if (FileArchives[i]->getFileList()->findFile(filename)!=-1)
return true;
#if defined(_MSC_VER)
#if defined(_IRR_WCHAR_FILESYSTEM)
return (_waccess(filename.c_str(), 0) != -1);
#else
return (_access(filename.c_str(), 0) != -1);
#endif
#elif defined(F_OK)
#if defined(_IRR_WCHAR_FILESYSTEM)
return (_waccess(filename.c_str(), F_OK) != -1);
#else
return (access(filename.c_str(), F_OK) != -1);
#endif
#else
return (access(filename.c_str(), 0) != -1); //FIXME: use of undeclared identifier 'access'
#endif
}
Code: Select all
//! Changes the current Working Directory to the given string.
bool CFileSystem::changeWorkingDirectoryTo(const io::path& newDirectory)
{
bool success=false;
if (FileSystemType != FILESYSTEM_NATIVE)
{
WorkingDirectory[FILESYSTEM_VIRTUAL] = newDirectory;
// is this empty string constant really intended?
flattenFilename(WorkingDirectory[FILESYSTEM_VIRTUAL], _IRR_TEXT(""));
success = true;
}
else
{
WorkingDirectory[FILESYSTEM_NATIVE] = newDirectory;
#if defined(_MSC_VER)
#if defined(_IRR_WCHAR_FILESYSTEM)
success = (_wchdir(newDirectory.c_str()) == 0);
#else
success = (_chdir(newDirectory.c_str()) == 0);
#endif
#else
#if defined(_IRR_WCHAR_FILESYSTEM)
success = (_wchdir(newDirectory.c_str()) == 0);
#else
success = (chdir(newDirectory.c_str()) == 0); //FIXME: use of undeclared identifier 'chdir'
#endif
#endif
}
return success;
}
Kind regards,
Daniel