|
|
@ -14,6 +14,7 @@ import org.openrs2.archive.cache.CacheExporter |
|
|
|
import org.openrs2.cache.DiskStoreZipWriter |
|
|
|
import org.openrs2.cache.DiskStoreZipWriter |
|
|
|
import java.nio.file.attribute.FileTime |
|
|
|
import java.nio.file.attribute.FileTime |
|
|
|
import java.time.Instant |
|
|
|
import java.time.Instant |
|
|
|
|
|
|
|
import java.util.zip.Deflater |
|
|
|
import java.util.zip.ZipEntry |
|
|
|
import java.util.zip.ZipEntry |
|
|
|
import java.util.zip.ZipOutputStream |
|
|
|
import java.util.zip.ZipOutputStream |
|
|
|
import javax.inject.Inject |
|
|
|
import javax.inject.Inject |
|
|
@ -93,6 +94,8 @@ public class CachesController @Inject constructor( |
|
|
|
call.respondOutputStream(contentType = ContentType.Application.Zip) { |
|
|
|
call.respondOutputStream(contentType = ContentType.Application.Zip) { |
|
|
|
ZipOutputStream(this).use { output -> |
|
|
|
ZipOutputStream(this).use { output -> |
|
|
|
output.bufferedWriter().use { writer -> |
|
|
|
output.bufferedWriter().use { writer -> |
|
|
|
|
|
|
|
output.setLevel(Deflater.BEST_COMPRESSION) |
|
|
|
|
|
|
|
|
|
|
|
val timestamp = FileTime.from(Instant.EPOCH) |
|
|
|
val timestamp = FileTime.from(Instant.EPOCH) |
|
|
|
|
|
|
|
|
|
|
|
for (key in exporter.exportKeys(id)) { |
|
|
|
for (key in exporter.exportKeys(id)) { |
|
|
|