[solved] cc.FileUtils.getInstance().getTextFileData can not load file under iPhone simulator

i have this file call ‘ch001’ (no extension, its a plain text file with my character json in text)

cc.log(cc.FileUtils.getInstance().fullPathForFilename(‘res/’+name));
does print the correct location in simulator (/Library/Application Support/iPhone Simulator/7.0.3/Applications/3C0DDEE8-AB0A-4E46-B5BC-64203E789623/MyGame.app/res/ch001)
but
var result = cc.FileUtils.getInstance().getTextFileData(cc.FileUtils.getInstance().fullPathForFilename(‘res/’+name));

result always return nothing.
Cocos2dx.2.2
anybody help please!

Where did you find cc.FileUtils.getTextFileData API?
You should use cc.FileUtils.getStringFromFile instead.

Thanks James,
It works.
cc.FileUtils.getInstance().getTextFileData is what i use in the HTML5 version and it always works until i test on JSB now.

also can’t find much language reference on cc.FileUtils so i dig up the function from CCFileUtils.js myself