|
resonance 1.0.1
|
Writer of a raw MODE2/2352 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) |
| Encode the raw image, write its cue sheet, 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 a raw MODE2/2352 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 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. Every output sector is encoded afresh as a Mode 2 Form 1 data sector, and a two-second postgap follows the volume.
|
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 | ) |
Encode the raw image, write its cue sheet, and check the replaced extents.
| output | Destination cue sheet path. The image is written beside it with a .bin suffix. |