Hi I'm doing a pass on the FileSystem chapter (yes you know the documentation that nobody write but everybody wants to read), I'm updating/adding method comments and I get the following. paf does not exist (FileSystem disk workingDirectory / 'paf' ) delete. works without barking => may delete should barks to be consistent. (FileSystem disk workingDirectory / 'paf' ) deleteAll. barks! (FileSystem disk workingDirectory / 'paf' ) deleteAllChildren. barks! (FileSystem disk workingDirectory / 'paf' ) deleteIfAbsent: [ Warning signal: ' File does not exist' ] . works Stef
On 2013-05-22, at 19:53, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi
I'm doing a pass on the FileSystem chapter (yes you know the documentation that nobody write but everybody wants to read), I'm updating/adding method comments and I get the following.
paf does not exist
(FileSystem disk workingDirectory / 'paf' ) delete. works without barking
=> may delete should barks to be consistent.
(FileSystem disk workingDirectory / 'paf' ) deleteAll. barks!
(FileSystem disk workingDirectory / 'paf' ) deleteAllChildren. barks!
(FileSystem disk workingDirectory / 'paf' ) deleteIfAbsent: [ Warning signal: ' File does not exist' ] . works
that's fully correct in my opinion. The error message are less consistent. There are operations that only work on files and some that only work on folders. #deleteAll, #deleteAllChildren are only working on directories (much like `rm -R folder`). #delete works on single instances, much like `rm file` but also on folders
We should talk when I'm back but my point is that deleting an nonexisting file should raise an error, if deleting an non existig folder does.
Hi
I'm doing a pass on the FileSystem chapter (yes you know the documentation that nobody write but everybody wants to read), I'm updating/adding method comments and I get the following.
paf does not exist
(FileSystem disk workingDirectory / 'paf' ) delete. works without barking
=> may delete should barks to be consistent.
(FileSystem disk workingDirectory / 'paf' ) deleteAll. barks!
(FileSystem disk workingDirectory / 'paf' ) deleteAllChildren. barks!
(FileSystem disk workingDirectory / 'paf' ) deleteIfAbsent: [ Warning signal: ' File does not exist' ] . works
that's fully correct in my opinion. The error message are less consistent. There are operations that only work on files and some that only work on folders. #deleteAll, #deleteAllChildren are only working on directories (much like `rm -R folder`). #delete works on single instances, much like `rm file` but also on folders
On 2013-05-23, at 07:41, stephane ducasse <stephane.ducasse@free.fr> wrote:
We should talk when I'm back but my point is that deleting an nonexisting file should raise an error, if deleting an non existig folder does.
yes FilePluginPrims >> #deleteFile: should raise a warning if the file does not exist. otherwise it is quite inconsistent :/
So we should sit together and do a pass on all the mails and sent and address what should be addressed. Wednesday morning? On May 23, 2013, at 9:50 AM, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-05-23, at 07:41, stephane ducasse <stephane.ducasse@free.fr> wrote:
We should talk when I'm back but my point is that deleting an nonexisting file should raise an error, if deleting an non existig folder does.
yes FilePluginPrims >> #deleteFile: should raise a warning if the file does not exist. otherwise it is quite inconsistent :/
stephane ducasse wrote
deleting an nonexisting file should raise an error
+1. This was the reason for #ensureDeleted to begin with... with one you care whether it's there or not, and the other you don't ----- Cheers, Sean -- View this message in context: http://forum.world.st/Pharo-dev-FileSystem-inconsistency-tp4689205p4689391.h... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (4)
-
Camillo Bruni -
Sean P. DeNigris -
stephane ducasse -
Stéphane Ducasse