Warning: session_start(): open(/var/lib/php/sessions/sess_96h7kje6g63sjse3bj4arnrlde, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass Zip2Zip {
// must set
File inZip;
ZipOutputStream outZip;
Set filesWritten;
// optional
IPred predicate;
*(File *inZip, ZipOutputStream *outZip, Set *filesWritten) {}
run {
ZipFile zipFile = new ZipFile(inZip);
try {
Enumeration entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement();
if (entry.isDirectory()) continue;
S name = entry.getName();
if (predicate != null && !predicate.get(name)) continue;
if (!filesWritten.add(name)) continue;
ZipEntry e = new ZipEntry(name);
modifyZipEntry(entry, e);
outZip.putNextEntry(e);
copyStreamAndCloseInput(zipFile.getInputStream(entry), outZip);
}
} finally {
zipFile.close();
}
}
swappable void modifyZipEntry(ZipEntry in, ZipEntry out) {}
}