opening files

Noel J. Bergman noel at devtech.com
Sun Jun 24 17:06:34 UTC 2001


> We have another problem in squeak : we would like to
> be able to open a file from the Squeak environment.

As a general rule, you might want to browse the source code for the classes.
I tend to do it in emacs, but that's because I know emacs a lot better than
I know the browsing tools.

In any event, if you were to search for !FileDirectory (or use the browser),
you'd find the class comment telling you that the FileDirectory represents
the directory: the list of files.  Its responsibility is to know its own
path, and to enummerate the files it contains.

Next, look for !FileStream (or use the browser), and you'll find that its
class comments tell you that files are typically accessed using the
FileStream class.

This is a typical pattern segregating responsibility for I/O from
responsibility for folder behavior.

	--- Noel





More information about the Squeak-dev mailing list