Directory class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Directory class

Cesar Rabak-3
I'm trying to use Directory class, and all I got from the info page
does not enlighten me enough to use it except as a singleton.

How do I create an instance of Directory so I can iterate the contents
of it (using #contents)?

--
Cesar Rabak


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Directory class

S11001001
On Tue, 2007-10-02 at 22:25 -0300, Cesar Rabak wrote:
> I'm trying to use Directory class, and all I got from the info page
> does not enlighten me enough to use it except as a singleton.

Directory class doesn't need instance creation methods because the ones
it inherits from File class are good enough.  See that class's
documentation node.

--
;;; Stephen Compall ** http://scompall.nocandysw.com/blog **
"Peta" is Greek for fifth; a petabyte is 10 to the fifth power, as
well as fifth in line after kilo, mega, giga, and tera.
  -- Lee Gomes, performing every Wednesday in his tech column
     "Portals" on page B1 of The Wall Street Journal

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Directory class

Robin Redeker-2
In reply to this post by Cesar Rabak-3
On Tue, Oct 02, 2007 at 10:25:34PM -0300, Cesar Rabak wrote:
> I'm trying to use Directory class, and all I got from the info page
> does not enlighten me enough to use it except as a singleton.
>
> How do I create an instance of Directory so I can iterate the contents
> of it (using #contents)?

I recently used the Directory class too, this was what I discovered
about how to use it:

You create a new instance eg. with the #name: message, and iterate via
#contents or #do:

   (Directory name: '/tmp') do: [:file| file displayNl]


Robin


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk