[Newbies] Re: FileDirectory

Ron Teitelbaum ron at usmedrec.com
Wed May 25 23:20:16 UTC 2016


Hi Joe,

 

Excellent.  Remember that you should also look at the super classes for
methods.  UnixFileDirectory is the instance of "FileDirectory default" but
it's also a subclass of FileDirectory so the methods you can call include
UnixFileDirectory and all the methods on the class hierarchy including the
methods on FileDirectory.  Please see the method categories on FileDirectory
that I mentioned.

 

The question I asked was a bit different.  When you ask for the #entries of
the instance "FileDirectory default" what class is each file?

 

By the way, based on the question you asked there is a method on
FileDirectory to determine if the file exists before you read it (it's in
the method categories I pointed out to you).  What is that method?

 

All the best,

 

Ron Teitelbaum   

 

From: beginners-bounces at lists.squeakfoundation.org
[mailto:beginners-bounces at lists.squeakfoundation.org] On Behalf Of Joseph
Alotta
Sent: Wednesday, May 25, 2016 4:15 PM
To: beginners at lists.squeakfoundation.org
Subject: [Newbies] Re: FileDirectory

 

Hi Ron, 

I get an instance of UnixFileDirectory.  And there are only 6 methods for
UnixFileDirectory, none of them doing what I want. 

Sincerely, 

Joe. 





> On May 25, 2016, at 2:43 PM, Ron Teitelbaum [via Smalltalk] <[hidden
email]> wrote: 
> 
> Hi Joe, 
> 
> The hardest part of FileDirectory is understanding default. 
> 
> So start with: FileDirectory default. 
> 
> Note that default is on the class side.  Once you inspect that you are now

> on the instance side.  Have a look at the categories #enumeration, #'file 
> status', and #'file operations', and #'file name utilities'   
> 
> when you get a file from that instance you are no longer on FileDirectory.

> What class are the file entries? 
> 
> Let me know if that helps. 
> 
> All the best, 
> 
> Ron Teitelbaum 
> 
> 
> 
> > -----Original Message----- 
> > From: [hidden email] [mailto:beginners- 
> > [hidden email]] On Behalf Of Joseph Alotta 
> > Sent: Wednesday, May 25, 2016 3:22 PM 
> > To: [hidden email] 
> > Subject: [Newbies] FileDirectory 
> > 
> > Greetings, 
> > 
> > I am looking for some documentation or snippets of code for using the 
> > FileDirectory class. 
> > 
> > I want to check if a file exists before I try to read it. 
> > 
> > I also want to look at a list of files in the directory. 
> > 
> > I did search SBE and google but found nothing. 
> > 
> > Sincerely, 
> > 
> > Joe. 
> > 
> > 
> > 
> > _______________________________________________ 
> > Beginners mailing list 
> > [hidden email] 
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> 
> _______________________________________________ 
> Beginners mailing list 
> [hidden email] 
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
> 
> 
> If you reply to this email, your message will be added to the discussion
below: 
> http://forum.world.st/FileDirectory-tp4897377p4897389.html
> To start a new topic under Squeak - Beginners, email [hidden email] 
> To unsubscribe from Squeak - Beginners, click here. 
> NAML 

 

  _____  

View this message in context: Re: FileDirectory
<http://forum.world.st/FileDirectory-tp4897377p4897398.html> 
Sent from the Squeak - Beginners mailing list archive
<http://forum.world.st/Squeak-Beginners-f107673.html>  at Nabble.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160525/09840fc7/attachment.htm


More information about the Beginners mailing list