Full path to Directory (not to a file)

Hi guys.

In Cocos2d-x, is there a way to get the full path to Directory? I have tried CCFileUtils::sharedFileUtils()->fullPathForFilename, it give correct path (both file and directory) on iOS but on Android, it’s seem wrong.

Here’s the code:

std::string hmmPath = CCFileUtils::sharedFileUtils()->fullPathForFilename("model/hmm/en_US/hub4wsj_sc_8k");    // This is a folder
std::string lmPath = CCFileUtils::sharedFileUtils()->fullPathForFilename("model/lm/en/turtle.DMP");                        // And this is a file

And here’s the output on Android:

model/hmm/en_US/hub4wsj_sc_8k
assets/model/lm/en/turtle.DMP

I can see that the turtle.DMP is under assets folder but the hub4wsj_sc_8k folder is not. Any suggests?

I got the same problem.
In CCFileUtilsAndroid.cpp I found this:

bool CCFileUtilsAndroid::isFileExist(const std::string& strFilePath)
{
    if (0 == strFilePath.length())
    {
        return false;
    }

    bool bFound = false;

    // Check whether file exists in apk.
    if (strFilePath[0] != '/')
    {
        std::string strPath = strFilePath;
        if (strPath.find(m_strDefaultResRootPath) != 0)
        {// Didn't find "assets/" at the beginning of the path, adding it.
            strPath.insert(0, m_strDefaultResRootPath);
        }

        if (s_pZipFile->fileExists(strPath))
        {
            bFound = true;
        }
    }
    else
    {
        FILE *fp = fopen(strFilePath.c_str(), "r");
        if(fp)
        {
            bFound = true;
            fclose(fp);
        }
    }

    return bFound;
}

this code just check file, then I try adding this but it’s still not working:

        if (!bFound)
        {
            DIR *dir;
            if ((dir = opendir (strFilePath.c_str())) != NULL)
            {
                bFound = true;
                closedir(dir);
            }
        }

I think it’s because the strFilePath is not suitable for opendir(), do somebody got any ideas?

Seems that these methods work with directory paths on iOS, but on Android, they must be actual files.