[Pharo-dev] AbstractFileReference>>ensureDelete when directory has children

Cyril Ferlicot D. cyril.ferlicot at gmail.com
Sun Aug 20 13:37:09 EDT 2017


Hello,

I often was surprise to get primitive failures while calling
#ensureDelete. I saw that when a folder has children, we should not call
#ensureDelete but #ensureDeleteAll, at least on Windows.

I think we should raise an other error than "Primitive Failure" when we
are in that case. Something like "DirectoryHasChildren" that would
signal "This directory contains files and cannot be deleted.".

What do you think?

-- 
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20170820/0f457217/attachment.asc>


More information about the Pharo-dev mailing list