2007.11.26 17:54
Though simple, and probably quite secondary, the FileServer is a very important part of the engine.
It makes sure that you can get to a file, and it makes sure that when you get it, it's correct.
A multitude of methods are available for accessing files. For the moment, I'm just implementing a priority search path. So, it tries to open the file from directory A (by appending the path to the search path entry), then directory B, and so on. That way, all my main (stable) data can be in directory B, and the stuff I want to test in directory A. So, when I ask for a file, it will usually not find it in directory A, and proceed to directory B. But the files that I'm testing out will be picked up before the stable ones. Win!
Another cool thing to add to a FileServer is the ability to serve packed files or remote files transparently, but I don't need that quite yet.