[squeak-dev] Re: Selection in new file list
Andreas Raab
andreas.raab at gmx.de
Thu Oct 8 04:53:59 UTC 2009
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?
> 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?).
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|