[Scummvm-devel] PORTERS: Behavior of FSNode::getChild changed
Max Horn
max at quendi.de
Wed Sep 3 14:59:13 CEST 2008
Hi everybody, especially you porters,
with this email (part of a series) I want to inform you about some
changes related to the FSNode code, the class File, and in general how
we handle files. I will try to describe briefly what changed, why, and
how we suggest you deal with it. As always, questions, suggestions,
wishlists and constructive criticism are welcome :).
CHANGE: As briefly discussed on this list, the behavior of
FSNode::getChild() was changed.
OLD: When invoking getChild on a directory node with a name string
which did *NOT* match any child of the dir, the getChild specs used to
require that an invalid node is returned.
NEW: Now, a valid node node should be returned. This node would return
"false" when its exists() or isDirectory() methods are invoked. But
invoking its openForWriting() method should work (assuming the backend
& the parent dir allow writing, of course).
PORTERS TASK: Check your ports FS node implementation, and adapt it.
AFFECTED PORTS: PS2, PalmOS, Amiga, Symbian (?)
RATIONALE: This is how the POSIX FSNode implementation (incorrectly)
behaved all the time, and some code relied on this. Instead of fixing
the POSIX backend and code using, we decided to make the new behavior
officially, as it goes hand in hand with the new openForWriting()
method, making it possible create new files (on systems which support
that).
Cheers,
Max
More information about the Scummvm-devel
mailing list