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();
fsm.setCacheStrategy(CacheStrategy.ON_CALL);
fsm.init();
// 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.closeFileSystem(fs);
fsm.getFilesCache().removeFile(fs, fName);
PrivilegedFileReplicator fr = (PrivilegedFileReplicator)fsm.getReplicator();
fr.close();
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
"zip:http://..."
after I call getChilder()..
What is wrong with my code ?
Thanks in advance.
--
View this message in context:
http://apache-commons.680414.n4.nabble.com/Files-in-temp-vfs-cache-are-not-deleted-after-read-zip-tp3475235p3475235.html
Sent from the Commons - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]