You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Rami Ojares <ra...@elisa.fi> on 2004/06/02 13:03:19 UTC

Re: [vfs] FileObject.delete

If I delete a FileObject I don't get any information about
whether that FileObject was actually deleted or not.
If file is FOLDER with children or IMAGINARY nothing is
deleted but there is no way to know that.
Actually you can query the file type and know for
sure in case of IMAGINARY but in case of FOLDER the only
way is to call fileObject.getChildren().length == 0
And I quess this can be an expensive operation if
you just want to know whether the delete did something or not.

Since I don't know the imlementations of the providers (yet) I can't
say what would be the most efficient strategy but one idea could
be that delete would return boolean that would tell whether something
was deleted or not.

- Rami Ojares

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [vfs] FileObject.delete

Posted by Mario Ivankovits <im...@apache.org>.
Rami Ojares wrote:

>Since I don't know the imlementations of the providers (yet) I can't
>say what would be the most efficient strategy but one idea could
>be that delete would return boolean that would tell whether something
>was deleted or not.
>  
>
I will have a look at it, but i think i will implement it that way.

-- Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org