commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lewis <...@ascii27.net>
Subject Re: [VFS] VFS.getManager().getFilesCache() - exists() vs findFiles()
Date Wed, 18 May 2005 12:05:14 GMT
Wouldn't it make sense to have findFiles() update cache entries? Or is
that the plan for 2.0?


Mario Ivankovits wrote:

> manco wrote:
>
>>
>> I dont see why the findFiles() sees it but the exist() fails
>>  
>
> It has something to do with the cache, this is correct (and it drives
> me crazy, but this will be something for vfs 2.0).
> findFiles finds the file on the filesystem but get the cached object
> which might be in state "file deleted".
>
> To refresh its cached informations you could call ".close()" on the
> fileobject in question. This is the intended way to do this.
>
> e.g.
>
> for (FileObject fo : foundFiles)
> {
>    fo.close();
>    if (fo.exists())
>    {
>       ......
>    }
> }
>
> ---
> Mario
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org



---------------------------------------------------------------------
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