[Scummvm-devel] small FilesystemNode changes (Porters should also read this!)

Johannes Schickel lordhoto at gmail.com
Sat Jul 22 19:01:49 CEST 2006


Hi,

I added an isValid method to FilesystemNode today which can be used
to check if a given FilesystemNode can be used for anything, the
FS backends seemed to support it anyway. AbstractFilesystemNode got a
pure virtual isValid method also for this reason.

The GP32 has to be changed to support isValid, since at the time
of writing it always returned true.

I also extended File::open which takes a FilesystemNode to check if
the node is valid and to check if it's a directory and return false
if that's true.

Please change your code using FilesystemNode to use isValid first
before doing anything with a FilesystemNode object, since
FilesystemNode("foo") isn't granted to work if 'foo' is for example
in extrapath or any other dir which is used by
File::addDirectoryRecursive. (This is of course another problem,
but I mention it here so you know *why* isValid was introduced)

// Johannes




More information about the Scummvm-devel mailing list