[Scummvm-devel] Re: ScummVM release schedule / plans

Max Horn max at quendi.de
Sun Mar 21 16:53:00 CET 2004


Am 21.03.2004 um 23:49 schrieb Marcus Comstedt:

>
> Tore Anderson <tore at debian.org> writes:
>
>>   Would not something like:
>>
>>     #if defined(UNIX)
>>     #define DEFAULT_SAVEPATH "~/.local/share/scummvm/"
>>     #else
>>     #define DEFAULT_SAVEPATH "."
>>     #fi
>>
>>   be appropriate?
>
>
> Not really.  "." is in itself a UNIXism.  (Which happens to be
> borrowed to MS-DOS and its descendants.)
>
> Hopefully the new file handling system envisioned by Max will provide
> some mechanism for handling this in the right way.
>
This is getting quite off-topic, but yeah, I wanted to do a "proper" 
solution for that. Sadly I so far didn't have much time to work on this 
:-/. But I will post it here for further discussion before I add 
anything to CVS.

I think we need to abstract "file paths" completely. My FilesystemNode 
was a first attempt at that, but it's limited by the fact that it is 
only used at the fringes of the system.

My best analogy right now is the Java "File" class (see 
<http://java.sun.com/j2se/1.3/docs/api/java/io/File.html>), which 
attempts to do more or less this. It's not perfect, but it has some 
very useful concepts. It tries to abstract paths away, and can be used 
to check for the existence of a file, whether it is readable/writable, 
etc.. The name "File" is a bit misleading, I think -- "FileLocation" or 
"FilePath" or "FilesystemNode" or so are a better description, I think.

Note: I am only referring to the 'File' class in Java, not to the 
complicated way they are doing File I/O. My hope is to have a system 
which isn't more complicated than what we have now... i.e. to the 
engine author, little should change.



Cheers,

Max





More information about the Scummvm-devel mailing list