On 2013-05-22, at 19:39, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
(FileSystem disk workingDirectory / 'fooFolder3') ensureDirectory. (FileSystem disk workingDirectory / 'fooFolder3') ensureDeleted.
works
I get a primitive failure
(FileSystem disk workingDirectory / 'fooFolder') createDirectory. (FileSystem disk workingDirectory / 'fooFolder' / 'fooInsidefoo') createDirectory. (FileSystem disk workingDirectory / 'fooFolder') ensureDeleted.
because
ensureDeleted is defined as
ensureDeleted self deleteIfAbsent: [].
and it would be better to define it as
ensureDeleted self deleteAll.
What do you think?
no, that is wrong and dangerous. #ensureDeleted just removes a single entity. it is the safe for of #delete. In this case I would add a #ensureDeletedAll