Hi,
I'm using commons VFS to read and write on different sources. I managed
to read and write on a file system source, ftp source...
My problem is the following; when dealing with jar or zip files, I'm not
able to write, and more specifically I can't create a new folder inside.
Check out the following code:
FileObject fo = manager.resolveFile("file://C:/c3dq/file.jar");
FileObject jarSys = manager.createFileSystem(fo);
FileObject folder = jarSys.resolveFile("new");
folder.createFolder();
I can read the jar file, and list its children, but when I call the
createFolder() method I get the following exception:
org.apache.commons.vfs.FileSystemException: Could not create folder
"jar:file://C:/c3dq/file.jar!/new" because its parent folder is
read-only.
at
org.apache.commons.vfs.provider.AbstractFileObject.createFolder(Abstract
FileObject.java:798)
Is there anyway I can create new folder and files inside the jar itself?
Another question is: Is there a way to access a password protected jar
file in VFS?
Thank you...
Regards,
Nadim,