testing the existance of a file...
Hans-Martin Mosner
hmm at heeg.de
Thu Mar 16 07:50:44 UTC 2006
nelson - wrote:
> Hi all,
> i can't figure out how to test the existance of a file. The book
> i'm reading says to use
>
> aFileName exists
>
> but if i create a filename from a string sending the message
>
> aString asFilename
That works in the VisualWorks dialect. They have a class Filename with
appropriate platform subclasses, and Filename objects can do all sorts
of filesystem-related tasks (such as checking for existence, enumerating
directory contents, creating streams etc).
I like the concept - it makes dealing with files pretty easy.
But Squeak does not implement it that way, although it, too, has evolved
quite a bit relative to the original Smalltalk-80 file handling.
Cheers,
Hans-Martin
More information about the Squeak-dev
mailing list
|