[squeak-dev] Re: Selection in new file list

John M McIntosh johnmci at smalltalkconsulting.com
Thu Oct 8 17:34:18 UTC 2009


On 2009-10-07, at 9:53 PM, Andreas Raab wrote:

> John M McIntosh wrote:
>> Well we used URI with great success in Sophie, since we could use a  
>> relative path then resolve it to a network path, file system path,  
>> or a specialized in memory path in order to store book objects in  
>> those
>> three storage areas.
>> But a few things come to mind for example we could someone do
>>    foo := CPlatform homeDirectory or documentDirectory or  
>> tempDirectory or musicDirectory and it would mostly do the right  
>> thing based on the platform to construct a URI.
>
> Interesting. The result was a URI instead of a FileDirectory? In  
> Qwaq^H^H^H^H Teleplace we we use e.g., FileDirectory [temp|home|log| 
> cache]Directory to return instances of FileDirectory. Or did you  
> implement most of the interesting file creation methods on URIs as  
> well?

As the Sophie storage Czar I ensured everything was a URI. The book  
storage manager then would instantiate a concrete class that would  
resolve the URI to the particular target (file, network, memory) at the
point of doing the open/read/write/delete/copy.


>
>> then what if you did
>>    fum := CPlatform homeDirectory , 'myStuff' , 'calledWhat' ,  
>> 'where.txt' .
>
> Ooooh. Comma. I like that. Already a generic concatenation operator.  
> Much better than slash.
>
>> using the ',' operator to concatenate a path together. Then a  
>> method to return the proper path based on the type you want, and of  
>> course the platform specific details.
>>    platformDirectoryPath = fum asFileSytemDirectoryPath.
>
> That is quite nice. Yeah I could see using that. Any chance you can  
> re-release the URI code as MIT? (IIRC, Sophie is BSD, right?).

Oooh a license question. Well you would have to ask Michael, I'd  
*believe* the majority of the URI code predated usage in Sophie.

However maybe we want to consider the issue, where this path to an  
object and then why would we make the object a URI or a text string?
Perhaps it should be it's own unique class which you resolve to a URI  
or filesystempath when needed.

As mentioned in another note the issue(s) for example

path := path,'foo'    does that mean we want to add the foo directory  
or tack on 'foo' to the last textual item?


>
> Cheers,
>  - Andreas

--
= 
= 
= 
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:   
squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
= 
= 
= 
========================================================================







More information about the Squeak-dev mailing list