|
wavelength 1.0.0
|
Writer of an ISO image of a volume with replaced files. More...
#include <imagebuilder.h>
Public Member Functions | |
| std::expected< std::uint32_t, Error > | write (const std::filesystem::path &output) |
| Write the ISO image and check the replaced extents. | |
Static Public Member Functions | |
| static std::expected< ImageBuilder, Error > | plan (Volume &source, std::vector< Replacement > replacements) |
| Place each payload and collect the sectors that change. | |
Writer of an ISO image of a volume with replaced files.
A payload fitting its original extent overwrites the extent with zero padding. A larger payload moves to sectors appended after the volume, and the volume size grows with it. Either way the ISO9660 directory record of the file gets the payload's extent, its size, and its modification time. Each directory above the file, up to the root, is raised to that time when it is older, and the primary volume descriptor's modification date becomes the root directory's date when that is newer. Every other date is copied from the input.
On a DVD image the UDF file system gets the same changes. The file entry gets the extent, the size, and the modification and attribute times, the directory file entries above it are raised, and the integrity descriptor's recording time is raised. When a payload moves, the partition grows to cover the appended sectors, and a copy of the anchor volume descriptor pointer follows them as the last sector.
|
static |
Place each payload and collect the sectors that change.
| source | Open original image or disc root. It must outlive the builder. |
| replacements | Payloads in placement order. |
| std::expected< std::uint32_t, Error > Tools::BuildImage::ImageBuilder::write | ( | const std::filesystem::path & | output | ) |
Write the ISO image and check the replaced extents.
| output | Destination ISO image path. |