GRPlatfom>>deleteFile:ifAbsent:ifFail:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GRPlatfom>>deleteFile:ifAbsent:ifFail:

Philippe Marschall
Where is that used?

Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: GRPlatfom>>deleteFile:ifAbsent:ifFail:

Nick
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?

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?

Nick

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: GRPlatfom>>deleteFile:ifAbsent:ifFail:

Philippe Marschall
2011/8/15 Nick Ager <[hidden email]>:
>> 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
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: GRPlatfom>>deleteFile:ifAbsent:ifFail:

Nick
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).

OK I'll remove GRPlatfom>>deleteFile:ifAbsent:ifFail: 

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev