OutputStream out = target.getOutputStream(false);
if (out == null) {
String name = target.getName();
if (target instanceof LocalImpl)
name = ((LocalImpl)target).getBasefile().getAbsolutePath();
throw new OLATRuntimeException(ZipUtil.class, "Error getting output stream for file: " + name, null);
}
ZipOutputStream zipOut = new ZipOutputStream(out);
for (Iterator<VFSItem> iter = vfsFiles.iterator(); iter.hasNext();) {
success = success && addToZip(iter.next(), "", zipOut);
}