/** * Extract a file system bundle to a directory in the * local file system on the device/emulator. * @param handle The resource handle of the bundled * file system. Bundles are created with the Bundle tool * that comes with MoSync. * @param destinationPath The path of the directory where * the file system will be extracted. */ bool FileUtil::extractFileSystem( MAHandle handle, const MAUtil::String& destinationPath) { setCurrentFileSystem(handle, 0); int result = MAFS_extractCurrentFileSystem(destinationPath.c_str()); freeCurrentFileSystem(); return 1 == result; }
int testfopen() { FILE *f; int i; setCurrentFileSystem(RES_BUNDLE, 0); f = fopen("mafs.data", "rb"); MAASSERT(f); for(i = 0; i < 10; i++) { int j; /*int ret =*/ fread(&j, sizeof(int), 1, f); if(i == j) { ;//int a = 2; } } return 0; }