[physfs] Multiple contexts in one process

Sherief Farouk sherief.personal at gmail.com
Mon May 14 23:55:09 EDT 2018


I made a small proof-of-concept implementation of this idea, which can be
found at https://bitbucket.org/sherief/physfs-ng-public - keep in mind that
it is both incomplete and incorrect in some aspects (no per-context error
code support for example) but for now it allows you to have multiple
contexts, each with their own search path(s) and write path without
(hopefully) breaking API backwards compatibility. For my use case there is
certainly value in having multiple components have isolated PhysFS contexts
inside a single process. Is there wider interest in this feature? If so,
it'd be nice to have it added to a future version of PhysFS and maintained
going forward - if not, I can just keep a private fork and implement it
there.

On Wed, May 2, 2018 at 7:51 PM Sherief Farouk <sherief.personal at gmail.com>
wrote:

> I have multiple components in a process where each has a view to a section
> of the filesystem, and I'd ideally like to have each of these moved to
> PhysicsFS for various reasons, with transparent support for compressed
> archives being somewhere near the top of that list. As of PhysicsFS 3.x
> there doesn't seem to be a way to have multiple contexts living together
> inside the same process.
>
> Am I missing some way to do this (other than having multiple directories
> under "/" for each component and mapping component #1's "/foo/bar" to
> "/__component_1/foo/bar" internally? If not, would it be possible to
> propose and / or implement such functionality for a future version of
> PhysicsFS?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/physfs/attachments/20180514/40fd7cff/attachment.html>


More information about the physfs mailing list