raceintospace/raceintospace — pull request #39 by willglynn (2012-11-14 04:26:18+00:00)
Title: Add a filesystem abstraction

This changeset adds a `Filesystem` class and a `File` class on top of PhysicsFS. The underlying implementation is totally hidden from the users, so we can change it later. This gives us a target for #29.

`Filesystem` assumes you use full paths everywhere. No magic constants -- if you want `gamedata/roster.json`, say `Filesystem::open("gamedata/roster.json")`. It also supports writing to a platform-appropriate directory for things like save games. These appear in the hierarchy, overlaid transparently on the files shipped with the game. This means you could do things like read from the roster, change it, and write it back -- you'd actually be writing to somewhere inside the user's home directory, but it looks to the game as if you modified the game data.

I bumped PhysicsFS to the latest development version because I want [`PHYSFS_getPrefDir`](http://icculus.org/physfs/docs-devel/html/physfs_8h.html#acd87392d234d070695303521bb8052a5). I think this causes problems on Windows.