commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JavaDev7 <>
Subject Files in "..temp\vfs_cache" are not deleted after read zip
Date Tue, 26 Apr 2011 11:40:39 GMT
Hi everybody,

I don'tknow how to ensure that files after processing will be
deleted from "Temp\vfs_cache" ..

I have multithreaded aplication.
Each thread read remote zip archives ...

My code looks like this:

StandardFileSystemManager fsm = new StandardFileSystemManager();

// do some job.. read zip and get content to byte[]
FileName fName = fsm.resolveURI(...)
FileObject dir = fsm.resolveFile("zip:" + fName.toString());
FileObject[] fObjs = dir.getChildren(); // get files in zip
process fObjs ...

If I call fsm.close() -> files are not clear from \Temp\vfs_cache

I also tried almost everything:

FileSystem fs = dir.getFileSystem();
fsm.getFilesCache().removeFile(fs, fName);

PrivilegedFileReplicator fr = (PrivilegedFileReplicator)fsm.getReplicator();

Not is working.. :(

I need read zip file (content of zip archive) which are on other host so I
need cache because,
if I set NullFilesCache on fsm exception is thrown:
org.apache.commons.vfs.FileSystemException: Could not list the contents of
after I call getChilder()..

What is wrong with my code ?

Thanks in advance.

View this message in context:
Sent from the Commons - User mailing list archive at

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

View raw message