public static class AssetArchive Reads and writes the portable Runic Assets ZIP archive format.
Fields
CurrentVersion
public const string CurrentVersion = "runic.assets.archive/1" The archive contract written to runic-assets.json.
DefaultResourceName
public const string DefaultResourceName = "Runic.Assets.StaticFiles" The default manifest-resource name generated by Runic Assets' build target.
Methods
Inspect
public static AssetArchiveInspection Inspect(Stream source, AssetArchiveReadOptions? options = null) Validates an archive and returns its canonical, deterministic manifest inspection.
Read
public static AssetArchiveSource Read(Stream source, AssetArchiveReadOptions? options = null) Loads and validates a portable Runic Assets archive into memory.
ReadEmbedded
public static AssetArchiveSource ReadEmbedded(Assembly assembly, string resourceName = "Runic.Assets.StaticFiles", AssetArchiveReadOptions? options = null) Loads a canonical Runic Assets archive from an assembly manifest resource.
WriteAsync
public static ValueTask WriteAsync(IAssetSource source, Stream destination, CancellationToken cancellationToken = default) Writes a deterministic, portable ZIP archive from one validated source.
WriteDirectoryAsync
public static ValueTask WriteDirectoryAsync(string sourceDirectory, Stream destination, string entryPointRelativePath = "index.html", IEnumerable<string>? excludedPaths = null, CancellationToken cancellationToken = default) Writes a canonical archive from a local directory using the same manifest, validation, media-type, cache, and ZIP writer authority as every other archive producer.