[physfs] PhysFS and absolute paths

Ryan C. Gordon icculus at clutteredmind.org
Sun Aug 22 02:11:12 EDT 2004

> That's what I was thinking, it would be pretty much orthogonal to 
> that.  While I know that PhysFS is designed for games, adding this 
> ability would seem to be relatively trivial (in terms of 
> space/complexity), and allowing the same cross-platform file system 
> access for both tools and code would seem to be a win-win.  Otherwise 
> the game uses PhysFS, and the tools end up using fopen/etc. and have 
> to deal with a different set of portability problems.

Let me think about this for a little while and hack something out.

This is probably just adding a new entry point and then a conditional to
__PHYSFS_verifySecurity(), really, but we'll probably have to have a 
disclaimer about trying to use this with archives.

Besides the obvious fact that "C:\blah" doesn't mean anything to the 
zipfile archiver, neither does "/blah/../bleh", since it assumes that 
paths with ".." will never make it to the archiver layer, and I don't 
want to add that functionality.

Also, there's nothing that writes into archivers, so you can't set your 
write path to C:\data.zip. Actually, the API allows for this, but none 
of the archivers support it. You have been warned.

Mostly I'm saying that, depending on your needs, this might not be as 
useful as you want.


More information about the physfs mailing list