class
Bakelite::Container::Writer
- Bakelite::Container::Writer
- Reference
- Object
Overview
Packs files into a standalone .bkl container or appends a Bakelite volume directly onto the end of an existing executable image.
Defined in:
bakelite/container/writer.crConstructors
Instance Method Summary
-
#add_volume(volume : Volume) : self
Adds a volume to be written into the container.
-
#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.
-
#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.
-
#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.
- #target_path : Path
-
#to_slice : Bytes
Serializes the container into an in-memory byte slice.
- #volumes : Array(Volume)
-
#write(append : Bool = true) : Int64
Executes the pack operation.
-
#write_to_io(io : IO, volume_start_offset : UInt64 = 0_u64) : Int64
Serializes the container directly into an IO stream starting at volume_start_offset.
Constructor Detail
Instance Method Detail
Adds a volume to be written into the container.
Finds an existing volume by name or creates and mounts a new one.
Packs a directory into a named volume.
Streams and packs an arbitrary IO stream into a named volume.
Executes the pack operation. Appends to target if it already exists, or creates it anew.
Serializes the container directly into an IO stream starting at volume_start_offset. Files within each volume are written in deterministic lexicographical path order.