bug in File Locator isRoot

Brian Rice water at tunes.org
Sat Dec 31 20:03:38 PST 2005


Just as I hit send, I realized that I mis-read what you were asking.

The answer right now is that there isn't logic to make this happen,  
but I see that there should be. Do you have ideas on how to do this?  
I'll give it some thought as well, since it's not a trivial design  
issue.

It would also make the Directory #/ selector and childNamed: work  
better - right now it always produces files that have directory  
locators. :-/ #exists for this case returns true only when it's an  
actual directory.

On Dec 31, 2005, at 7:54 PM, Brian Rice wrote:

> On Dec 31, 2005, at 7:46 PM, Jeff Sparkes wrote:
>> Is there a way to convert a string into a File or Directory depending
>> on the contents.
>> For example, when reading the arguments to a script, you won't  
>> know in
>> advance which of them
>
> Yeah, that's a good point, and I recall thinking of it when I had  
> written this code.
>
> It should be sufficient to do this:
>
> Slate 7> Directory Locator readFrom: 'foo'.
> P'foo/'
> Slate 8> File Locator readFrom: 'foo'.
> P'foo'
>
> and #exists calls if you do #newNamed: will know as well if they're  
> expecting a File or Directory and should answer the right Boolean.
>
> PS: Happy New Year!

--
-Brian
http://tunes.org/~water/brice.vcf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20051231/719aae84/PGP.pgp


More information about the Slate mailing list