On 11.06.2012 20:38, Mariano Martinez Peck wrote:
So if we now do:
'afileThatDoesntExist' asFileReference delete
I get a PrimitiveFailed. If this is what we want, can I add:
FileReference >> deleteIfExists
self exists ifTrue: [ self delete]
or something like that? because lots of places (tearDown of tests) I want to remove crao which may or may not exist...
thanks
-- Mariano http://marianopeck.wordpress.com
Is there any specific reason why you need to use setUp/tearDown instead of a more restricted scope? For scoped operations like tests, I always liked the XFileNamed: do: api, when you have references, how about: aFileReference tempFileDo: [:fileStream :canonicalPath (culled) |] Could be useful for command line interaction as well, I guess. Cheers, Henry