[Newbies] Re: FileDirectory

2016-05-25 Thread Joseph Alotta
Hi Ron,

> 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.

Okay, thanks.  I tried to do something with that, but I got an error.  I think 
I was trying to use a class method on the instance.


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

It is an Array of DirectoryEntry objects.

> 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?

fileExists:

I see what is happening.  I thought the on: method changes the path, like cding 
a directory.  But it gives a new instance.


dir := FileDirectory default.
dir on: '/Users/jja/Desktop’ ==> UnixFileDirectory on '/Users/jja/Desktop'
dir fileExists: 'categories.CSV’ ==>false
dir pathName 
==>'/Users/jja/Desktop/Squeak-4.3-All-in-One.app/Contents/Resources'

dir := FileDirectory on: '/Users/jja/Desktop’ ==> UnixFileDirectory on 
'/Users/jja/Desktop'
dir pathName ==> '/Users/jja/Desktop'
dir fileExists: 'categories.CSV’ ==> true


So on: is the equivalent of new, in that it gives a new instance.

Thank you,

Sincerely,

Joe.






--
View this message in context: 
http://forum.world.st/FileDirectory-tp4897377p4897418.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: FileDirectory

2016-05-25 Thread Joseph Alotta

> On May 25, 2016, at 3:38 PM, Hannes Hirzel [via Smalltalk] 
>  wrote:
> 
> Have a look as well at http://wiki.squeak.org/squeak/2184
> 
> What exactly do you want to do? 
> 
> —Hannes 

I saw that.  It comes up first on google.  It is 100% accurate and 100% 
useless.  

That is why the Terse Guide is the most popular documentation.  As far as it 
goes.


Sincerely,

Joe.










--
View this message in context: 
http://forum.world.st/FileDirectory-tp4897377p4897416.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


RE: [Newbies] Re: FileDirectory

2016-05-25 Thread Ron Teitelbaum
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-boun...@lists.squeakfoundation.org
[mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph
Alotta
Sent: Wednesday, May 25, 2016 4:15 PM
To: beginners@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
 
Sent from the Squeak - Beginners mailing list archive
  at Nabble.com.

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Re: FileDirectory

2016-05-25 Thread H. Hirzel
Have a look as well at http://wiki.squeak.org/squeak/2184

What exactly do you want to do?

--Hannes

On 5/25/16, Joseph Alotta  wrote:
> 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]
>>  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
>> ml-node+s1294792n107673...@n4.nabble.com
>> To unsubscribe from Squeak - Beginners, click here.
>> NAML
>
>
>
>
>
> --
> View this message in context:
> http://forum.world.st/FileDirectory-tp4897377p4897398.html
> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: FileDirectory

2016-05-25 Thread Joseph Alotta
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] 
>  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 
> ml-node+s1294792n107673...@n4.nabble.com 
> To unsubscribe from Squeak - Beginners, click here.
> NAML





--
View this message in context: 
http://forum.world.st/FileDirectory-tp4897377p4897398.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


RE: [Newbies] FileDirectory

2016-05-25 Thread Ron Teitelbaum
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: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-
> boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta
> Sent: Wednesday, May 25, 2016 3:22 PM
> To: beginners@lists.squeakfoundation.org
> 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
> Beginners@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] FileDirectory

2016-05-25 Thread Joseph Alotta
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
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners