[squeak-dev] ANN Rio now supports ftp

Keith Hodges keith_hodges at yahoo.co.uk
Wed Nov 12 16:52:42 UTC 2008


Igor Stasenko wrote:
> 2008/11/12 Keith Hodges <keith_hodges at yahoo.co.uk>:
>   
>>>> I like the original #asRio, and I wonder if there are any other
>>>> smalltalks which already use #asFile and #asDirectory, and classes File
>>>> and Directory. Nevertheless I can see why people would prefer the latter.
>>>>
>>>> votes?
>>>>
>>>>
>>>>         
>>> both? :)
>>>
>>>
>>>       
>> Igor, has anyone ever called you a trouble maker?
>>
>>     
>
> okay, okay..  :)
> it is really hard to choose. I'd prefer #asFile, #asDirectory ,
> because its less ambiguous and better indicates one's intent.
> But, as i read from your docs, if i not mistaken, behind these methods
> you having an instance of same class. From this perspective, there's
>   
You are not mistaken, Rio used to be one instance with different
adaptors. Once it realised that it was pointing to a directory, it would
switch its adaptor to one providing an api for directories.

However adaptors are no more, and became Rio, with subclass RioDir.
However I wanted to avoid any magic such as become, if the switch was to
be automatic, so I merged the protocol of RioDir into Rio.

The asDirectory option would make the decision manual, and would enable
Rio an RioDir (File and Directory) to be effective and separate again

Keith


> enough a single selector to convert string into rio instance. It also
> puts less fat in String protocol (if anyone cares).
>
>   
>> Keith
>>
>>     
>
>   




More information about the Squeak-dev mailing list