[physfs] PHYSFS_mount a directory of an archive?

Martin Felis martin at fysx.org
Fri Apr 11 05:28:23 EDT 2014


In the Android port of the LÖVE engine I am using SDL2 and the
development branch of PhysFS successfully to do what you want.

I first read the file using SDL_RWops from the assets directory into
memory and then use PHYSFS_mountMemory to load the file.

For details see here:
https://bitbucket.org/MartinFelis/love-android-sdl2/src/684adff8267cb3f97c51a6acea18fb1f6ecd4471/jni/love/src/modules/filesystem/physfs/Filesystem.cpp?at=master#cl-69

Cheers,
Martin

On 11.04.2014 00:07, Reto Schneider wrote:
> Hello
> 
> I am wondering if it is possible to mount a directory within an archive
> (in my case "/assets" in an Android .apk/zip) to the virtual root path
> "/" in physfs.
> 
> For example:
> 	PHYSFS_mount("/path/to/my/shiny/game.apk/assets", "/", 1);
> 
> Is this possible? Or can this behavior be achieved by other means?
> 
> Regards,
> Reto
> _______________________________________________
> physfs mailing list
> physfs at icculus.org
> http://icculus.org/mailman/listinfo/physfs
> 


More information about the physfs mailing list