pub struct ApplyContext { /* private fields */ }Expand description
Apply-time state: install root, target platform, flag toggles, and the internal file-handle cache used by SQPK writers.
Construct with ApplyContext::new and customise with the with_*
builder methods. SqpkTargetInfo chunks may overwrite the platform field
at apply time; ApplyOption chunks may overwrite the ignore-flags.
Implementations§
Source§impl ApplyContext
impl ApplyContext
Sourcepub fn new(game_path: impl Into<PathBuf>) -> Self
pub fn new(game_path: impl Into<PathBuf>) -> Self
Create a context targeting the given game install directory.
Defaults: platform is Platform::Win32, both ignore-flags are off.
Sourcepub fn ignore_missing(&self) -> bool
pub fn ignore_missing(&self) -> bool
Returns whether missing files are silently ignored during apply.
Sourcepub fn ignore_old_mismatch(&self) -> bool
pub fn ignore_old_mismatch(&self) -> bool
Returns whether old-data mismatches are silently ignored during apply.
Sourcepub fn with_platform(self, platform: Platform) -> Self
pub fn with_platform(self, platform: Platform) -> Self
Sets the target platform. Defaults to Platform::Win32.
Note: SqpkTargetInfo chunks in the patch stream will override this at apply time.
Sourcepub fn with_ignore_missing(self, v: bool) -> Self
pub fn with_ignore_missing(self, v: bool) -> Self
Silently ignore missing files instead of returning an error during apply.
Sourcepub fn with_ignore_old_mismatch(self, v: bool) -> Self
pub fn with_ignore_old_mismatch(self, v: bool) -> Self
Silently ignore old-data mismatches instead of returning an error during apply.