[physfs] PHYSFS_mount a directory of an archive?

Reto Schneider mailinglisten at reto-schneider.ch
Mon Apr 14 18:07:19 EDT 2014


On 14.04.2014 05:17, Ryan C. Gordon wrote:
> Oh, Wikipedia tells me .apk files are just .zip (specifically, .jar)
> files. I thought it was a different file format.

No idea if you are willing to accept patches, but I want a solution
which is less hacky than prefixes every path with "/assets" in my game
so I will try to come up with something. Right now I am thinking about
three possible solutions:

a) Create archiver_apk.c which internally just prepends every path with
"/assets" and forwards the request to __PHYSFS_Archiver_ZIP archiver
from archiver_zip.c
b) Add PHYSFS_mountBind("/assets", "/", 1) - sort of "mount -o bind" for
physfs
c) Add generic support for mounting directories within archives.

I suspect c is the preferable solution, right?

Regards,
Reto


More information about the physfs mailing list