I would like to create a zip file with the Commons VFS2 library. I know how to copy a file when using the prefix file, but for the zipfiles are not written and read.
fileSystemManager.resolveFile("path comes here")-method does not work when I try to use the path zip:/some/file.zipwhen file.zip is a nonexistent zip file. I can resolve an existing file, but a nonexistent new file fails.
So how to create this new zip file? I cannot use createFile () because it is not supported, and I cannot create a FileObject before this is called.
The usual way is to create a FileObject with this resolveFile, and then call createFile on the object.
source
share