Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
According to it's documentation `deleteRecursive()` should return true if operation is successful else false. But the semantics of the base function (`delete()`) it calls is different: it returns true if operation is successful, returns false if node does not exist, throws exception upon other errors, and therefore `deleteRecursive()` will also throw exception, and will return false if any sub-path is deleted already, which is confusing
To consolidate semantics, we should either have the function only return true/false or only throw exception upon error.
Also, to make change backward compatible, I'd propose the following change:
- deleteRecursive() will only return true/false, and will not throw exception. If subpath does not exist, it should consider successful
- create a new method called deleteRecursively() that will only throw exception upon error.
Attachments
Issue Links
- links to