commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles()
Date Thu, 19 May 2005 16:41:40 GMT
Andy Lewis wrote:
>First, what about adding a stat() method on FileObject, something akin
I dont want to introduce a new public api function.

Especially if I think that I have to call stat() immediatly after 
resolveFile() every time as I am not interested in performance but more 
in correct results.
My current code is flooded with nasty close() (instead of stat()) as 
this is the method which is intended to to the same as stat().

Sure, I know, it closes all streams (opened by the calling thread), but 
this is not a problem in this context, moreover it is wanted to behave so.
This forces a clean state on the remote side.

I admit, what we can do is to force this during findFiles() ... will see.

>While it might not solve every case, for example, if you resolve a
>cached deleted file from a URL using FileSystemManager.resolveFile() -
>how would that show up? (haven't tested it)
No server round trip here, so this file is still marked as "deleted".

I will have a look in refactoring FileObject to use no internal caching 
and allow to decorate it with a CacheFileObject with behaves more or 
less like we see it today.
And then, we could have such a CacheFileObject.stat() method.

It should be configureable on FileSystemManager and maybe on FileSystem 
And the default might be to use the FileObject without caching.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message