[squeak-dev] Re: Selection in new file list
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Oct 8 04:44:02 UTC 2009
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.
then what if you did
fum := CPlatform homeDirectory , 'myStuff' , 'calledWhat' ,
'where.txt' .
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.
On 2009-10-07, at 9:04 PM, Andreas Raab wrote:
> K. K. Subramaniam wrote:
>> On Wednesday 07 Oct 2009 10:26:48 pm Nicolas Cellier wrote:
>>> In st80, there was also a nice feature: * and ? would also apply
>>> to any
>>> part of the hierarchy
>>> like: /home/nice/squeak/*/*.cs
>> Since Squeak is a VM accessing filesystem on its host, shouldn't we
>> be using URLs in the image and let FilePlugin resolve it into
>> pathnames?
>
> I'm not particularly in favor of that option in tools that actually
> expose the file names to users. When you type file paths in, it just
> feels wrong to type, e.g., /c/users/andreas/; and typing file:///C:/users/andreas/
> is just plain awful (yes, that's *three* slashes after the colon -
> copied right out of firefox).
>
> It would be more useful if slashes could be universally used in code
> though; having to write stuff like
>
> foobar := (FileDirectoy default directoryNamed: 'foo')
> directoryNamed: 'bar'.
>
> is every bit as awful. Perhaps a binary operator #/ would be in
> order? I.e.,
>
> foobar := FileDirectory default / 'foo' / 'bar'.
>
> (although this overloads the meaning of #/ which is not great either)
>
> 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
|