Esempio n. 1
0
 void init_fs()
 {
   #if defined(MS_HAS_RESOURCES)
     mkdir("/resources", 0777);
     ms_rez_mount("/resources", &rez_root_dir);
   #endif
 }
void init_fs(MS_AppInstance* inst, const std::vector<std::string>& persistent_dirs)
{
    #if defined(MUTANTSPIDER_HAS_RESOURCES)
    mkdir("/resources", 0777);
    ms_rez_mount("/resources", &rez_root_dir);
    #endif

    if (persistent_dirs.empty())
    {
        inst->AsyncStartupComplete();
        inst->PostCommand("async_startup_complete:");
    }
    else
    {
        for (auto dir : persistent_dirs)
        {
            std::string path = persistent_name + "/" + dir;
            mkdir_p(path);
            ms_persist_mount(path.c_str());
        }
        ms_syncfs_from_persistent();
    }
}