[Seaside-dev] GRPlatfom>>deleteFile:ifAbsent:ifFail:

Philippe Marschall philippe.marschall at gmail.com
Tue Aug 16 06:18:51 UTC 2011


2011/8/15 Nick Ager <nick.ager at gmail.com>:
>> Where is that used?
>
> I added it to support an extension I'm writing for Pier. I wanted a
> #deleteFile: that would work in at least in Pharo and Gemstone.
> I couldn't find anything equivalent that worked across platform.
> Of course I could have added it as an extension method, but thought that it
> would be generally useful.
> Is there a policy for adding methods to GRPlatform?

In theory I think it should be a class extension on GRPlatform that
Pier makes like Seaside and Magritte already do (and prefix the method
with pier, like Magritte does). Ideally we can keep GRPlatform out of
the file business. If we really move files into GRPlatform it should
be a well thought out approach. That however is currently not the
case. If you look at GRPlatform you'll find all these horrible file
methods from file library in GRPlatform that were put there without
much thought (by me).

> I know I should have added a test - though file system testing seems
> non-trivial and I couldn't find any templates to follow. Perhaps we can
> address that at ESUG?

Files are really horrible. The API sucks, they are hard to test and
not portable. A couple of options I see for us:

 * remove all the feature bloat from that requires file system access
from file library (that's the only part of Seaside that requires file
system access)
 * write our own file system abstraction layer
 * pick some other file system abstraction layer (file system from Collin maybe)
 * leave as is

Cheers
Philppe


More information about the seaside-dev mailing list