commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles()
Date Thu, 02 Jun 2005 11:12:22 GMT
Philippe Poulard wrote:
>     Resource getResource() throws FileSystemException, XMLDBException {
>         boolean isXML = true;
>         Collection coll = DatabaseManager.getCollection(
>             XMLDBFileObject.this.getParent().getName().getURI()
>         );
>         for ( Iterator it = 
> XMLDBFileObject.this.getContent().getAttributes().entrySet().iterator() 
> ; it.hasNext() ; ) {
>             /*
>              * getAttributes() fails here because the type
>              * is FileType.IMAGINARY : it has been set when
>              * delete() has been called
So the problem is that imaginray files are not allowed to have attributes.
Why not simply avoid the loop over the attributes if the file is of type 
IMAGINARY?

I also do not fully understandy why it works if you call close() after 
delete() - during the attach() the file should still be IMAGINARY as it 
is deleted.
Might it be that your FileObject.doGetType() do not correctly report the 
type of the file?


---
Mario


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


Mime
View raw message