commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rami Ojares" <rami.oja...@elisa.fi>
Subject Re: [vfs] FileObject.delete
Date Wed, 02 Jun 2004 11:03:19 GMT
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


Mime
View raw message