- Online Community Forums » Programming Questions » Use real path instead of archive path (PhysFS)

This thread is locked; no one can reply to it. rss feed Print
Use real path instead of archive path (PhysFS)
Member #11,410
October 2009

I've run into a small issue.

I use PhysFS as the file interface to load all my data and so forth.

However, now I have a file that I need to read and write to on the hard drive. I also have a directory to make on the user path.

However, it appears that PhysFS has control and trying to make a directory in c:/users/.... is failing because PhysFS is looking for it in my archive (I think).

How can I get normal paths and virtual paths to work together?

Thomas Fjellstrom
Member #476
June 2000

can't you mount the system fs on its own virtual mount in physfs?

Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" --

Member #11,410
October 2009

I'm not sure what the syntax should be.

I tried:

PHYSFS_addToSearchPath("/", 1)


setting the interface is not working.

ALLEGRO_PATH* path = al_get_standard_path(ALLEGRO_USER_DATA_PATH);
    std::string pathStr;
    pathStr += al_path_cstr(path,ALLEGRO_NATIVE_PATH_SEP);
    bool made = al_make_directory(pathStr.c_str());
    int eno = al_get_errno();
    m_settingsPath = pathStr;

make directory is failing and when I check with the debugger, the make directory receives a vtable for physfs.

Member #358
May 2000

Try al_set_standard_fs_interface. Don't ask why they are separate things.

"Either help out or stop whining" - Evert

Member #11,410
October 2009

Oh, thanks. I had not even realized that there were 2 functions.

Go to: