class

Bakelite::Container::Writer

Inherits Reference < Object

Packs files into a standalone .bkl container or appends a Bakelite volume directly onto the end of an existing executable image.

Constructors

new(target_path : Path | String)
Source

Instance methods

add_volume(volume : Volume) : self

Adds a volume to be written into the container.

Source
find_or_create_volume(name : Symbol | String, mount_point : String = "", priority : Int32 = 0, default_chunk_size : UInt32 = 65536_u32, default_compression : CompressionType = CompressionType::Deflate) : Volume

Finds an existing volume by name or creates and mounts a new one.

Source
pack_directory(source_dir : Path | String, volume_name : Symbol | String = :root, mount_point : String = "", priority : Int32 = 0, chunk_size : UInt32 = 65536_u32, compression : CompressionType = CompressionType::Deflate, exclude : Array(String) = [] of String) : self

Packs a directory into a named volume.

Source
pack_stream(io : IO, size : Int64, virtual_path : String, volume_name : Symbol | String = :root, mount_point : String = "", priority : Int32 = 0, chunk_size : UInt32 = 65536_u32, compression : CompressionType = CompressionType::Deflate) : self

Streams and packs an arbitrary IO stream into a named volume.

Source
target_path
Source
volumes
Source
write(append : Bool = true) : Int64

Executes the pack operation. Appends to target if it already exists, or creates it anew.

Source