Hi,
I'm sorry Mario I did not receive "my" post neither your answer (and I
needed to switch to another mail accounts).
Big thanks for your help, I did not see the close() function.
Your suggestion works in the testcase, unfortunattely this does not work
for me as I copy from one fileobbject to another one with copyFrom :
try {
FileSystemManager fsManager = VFS.getManager();
FileObject sourceFileObject =
fsManager.resolveFile(source);
FileObject destFileObject =
fsManager.resolveFile(dest);
destFileObject.createFolder();
destFileObject.copyFrom(sourceFileObject, new
FileFilter(includes, excludes));
destFileObject.close();
sourceFileObject.close();
} catch (FileSystemException ex) {
throw new WorkflowException(ex);
}
source and dest are folders
FileFilter allows to include/exclude files with simple pattern "*.xml"
and it's recursive.
This code works the first time but not the second times after I have
deleted the directory dest.
I do not see if I can close all the files that are copied. Is it
possible or should I rewrite a copyFrom to solve this trouble ?
Have a nice day,
-eric
Mario Ivankovits wrote:
Hi!
With commons-vfs RC6, I experience sometimes the following exception :
Could not write to "file:///tmp/test/file3.txt" because it is read-only.
I've already answered it.
The current solution is to call file3.close() after the second
resolveFile.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]