ZipUtil

public final class ZipUtil

Platform-neutral zip/unzip helpers used by com.magmaguy.resourcepackmanager.mixer.engine.MixEngine.

The core zip/unzip behavior originated in com.magmaguy.magmacore.util.ZipFile (MagmaCore, MIT), keeping this module independent of Bukkit and MagmaCore. RSPM-specific filtered-output and streaming-digest variants live here so every platform uses the same archive policy.

Types

Link copied to clipboard
public final class ZipResult extends Record

Functions

Link copied to clipboard
public static void publishAtomically(Path temporary, Path target)
Shared atomic-publish helper: move temporary onto target with ATOMIC_MOVE, falling back to a plain replace when the filesystem can't do it atomically.
Link copied to clipboard
public static void unzip(File zippedFile, File destinationUnzippedFile)
public static void unzip(File zippedFile, File destinationUnzippedFile, BooleanSupplier cancellationRequested)
Link copied to clipboard
public static ZipUtil.ZipResult zipJavaResourcePackWithSha1(File directory, String targetZipPath, BooleanSupplier cancellationRequested)