Hi Ron,
<br/><br/>&gt; Excellent. &nbsp;Remember that you should also look at the super classes for methods. &nbsp;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. &nbsp;Please see the method categories on FileDirectory that I mentioned.
<br/><br/>Okay, thanks. &nbsp;I tried to do something with that, but I got an error. &nbsp;I think I was trying to use a class method on the instance.
<br/><br/><br/>&gt; The question I asked was a bit different. &nbsp;When you ask for the #entries of the instance “FileDirectory default” what class is each file?
<br/><br/>It is an Array of DirectoryEntry objects.
<br/><br/>&gt; 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). &nbsp;What is that method?
<br/><br/>fileExists:
<br/><br/>I see what is happening. &nbsp;I thought the on: method changes the path, like cding a directory. &nbsp;But it gives a new instance.
<br/><br/>&nbsp; &nbsp; &nbsp; &nbsp; 
<br/>dir := FileDirectory default.
<br/>dir on: '/Users/jja/Desktop’ ==&gt; UnixFileDirectory on '/Users/jja/Desktop'
<br/>dir fileExists: 'categories.CSV’ ==&gt;false
<br/>dir pathName ==&gt;'/Users/jja/Desktop/Squeak-4.3-All-in-One.app/Contents/Resources'
<br/><br/>dir := FileDirectory on: '/Users/jja/Desktop’ ==&gt; UnixFileDirectory on '/Users/jja/Desktop'
<br/>dir pathName ==&gt; '/Users/jja/Desktop'
<br/>dir fileExists: 'categories.CSV’ ==&gt; true
<br/><br/><br/>So on: is the equivalent of new, in that it gives a new instance.
<br/><br/>Thank you,
<br/><br/>Sincerely,
<br/><br/>Joe.
<br/><br/><br/>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/FileDirectory-tp4897377p4897418.html">Re: FileDirectory</a><br/>
Sent from the <a href="http://forum.world.st/Squeak-Beginners-f107673.html">Squeak - Beginners mailing list archive</a> at Nabble.com.<br/>