Add scan_iso entry point for file-backed ISO scans
Introduce libfreemkv::scan_iso(path, opts) -> (Disc, Box<dyn SectorSource>), the file-backed counterpart to DiscSession::scan. It is the single place that opens a FileSectorSource, reads its capacity, and runs Disc::scan_image, returning the scanned Disc plus a reusable reader over the same image so consumers stop hand-rolling that triple. Add an integration test that materialises a minimal synthetic UDF image to a real file, asserts scan_iso matches the manual open+scan_image composition, and confirms the returned reader is still usable (capacity + sector read). Also covers open-failure and scan-failure error propagation.
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ pub use drive::{Drive, DriveStatus, find_drive};
|
||||
// stop hand-rolling `open → wait_ready → init → probe_disc → identify → scan`.
|
||||
// Owns the `Drive` by value; forwards consumer-built key material into
|
||||
// `ScanOptions` (the library derives no certs — see `KeySpec`).
|
||||
pub use session::{DeviceTarget, DiscSession, KeySpec};
|
||||
pub use session::{DeviceTarget, DiscSession, KeySpec, scan_iso};
|
||||
|
||||
// ─── Errors ─────────────────────────────────────────────────────────────────
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user