[BUG] Problem creating FileStream on Macs?
stp at create.ucsb.edu
Mon May 24 02:34:53 UTC 1999
Doug Way wrote:
> [ ... ]
> According to Ohshima, Squeak 2.4 on Mac sometimes fails to create an
> instance of FileStream.
> It silently returns nil, instead of a FileStream. Maybe the failure
> occurs in VM.
> (I cannot check by myself, because I'm not a Mac user).
Since the file I/O system does not use exceptions, returning nil is the only way
things like file opening can fail gracefully. Every method that opens a file
should check the result against nil before proceeding.
This is not specific to the Mac VM; there's alot of code out there that's not
portable among platforms, e.g., assuming the path name separator is "\" as in
several packages I've seen. If you create a platform-inappropriate file name,
you'll get a nil back when you try to open it.
Stephen Travis Pope
stp at create.ucsb.edu http://www.create.ucsb.edu/~stp/
More information about the Squeak-dev