bool HelloWorld::init()

{

    if ( !Layer::init() )

    {

        return false;

    }

    

    auto fu=FileUtils::getInstance();

    //FILE *f=fopen(fu->fullPathFromRelativeFile("data.txt",fu->getWritablePath()).c_str(),"w");

    //fprintf(f,"Hello World");

    //fclose(f);

    

    //log("%s",fu->getWritablePath().c_str());

    

    Data d=fu->getDataFromFile(fu->fullPathFromRelativeFile("data.txt",fu->getWritablePath()));

    

    log("%s",d.getBytes());

    

    return true;

}

posted on 2016-03-01 22:10  baraka  阅读(397)  评论(0)    收藏  举报