Re: [AD] Clarifying and revising filesystem API

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I think the concept of a CWD is useful, in the way that our 'current
display' principle is useful. It would be best if it started by
default in the resource directory of the app (which is platform
dependent) We'd have to make it per-thread.
In terms of changing the CWD (for example you mostly want to access
resource files but then you want to load a config file) we could
either provide functions to get and set the CWD, or push and pop, or
we could have extended versions of the load functions that take a
AL_FS_ENTRY as well as the string path. The fs entry would be the root
of the path (i.e. allegro does the prepending for you). Or, we could
have URIs in the path to represent this.
Also we need the CWD to be any directory-like AL_FS_ENTRY, not just a
directory on disk.
Finally I'm also not sure about having AL_FS_ENTRY being either
directory-like or file-like, would it be confusing or not? AL_FS_ENTRY
could be the 'superclass' of AL_FS_DIR and AL_FS_FILE, with the
appropriate operations defined for each.

I think Thomas has got everything in place for the VFS, just that the
'user space api' needs a bit more thought in terms of how an actual
game might use it.

Pete




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/