issue 1405:implement CCFileUtils::getResourceDirectory() on iOS

This commit is contained in:
minggo 2012-08-15 16:03:55 +08:00
parent 1ef1079d2d
commit 4a97f52cd4
2 changed files with 8 additions and 3 deletions

View File

@ -77,13 +77,13 @@ public:
/// @endcond
/**
@brief Set the ResourcePath,we will find resource relative to this path
@param pszResourcePath Relative path to root
@brief Set the resource directory,we will find resource relative to this directory
@param pszDirectoryName Relative path to root
*/
void setResourceDirectory(const char *pszDirectoryName);
/**
@brief Get the ResourcePath
@brief Get the resource directory
*/
const char* getResourceDirectory();

View File

@ -177,6 +177,11 @@ void CCFileUtils::setResourceDirectory(const char *pszDirectoryName)
}
}
const char* CCFileUtils::getResourceDirectory()
{
return m_obDirectory.c_str();
}
const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
{
CCAssert(pszRelativePath != NULL, "CCFileUtils: Invalid path");