Struct apple_flat_package::reader::PkgReader
source · pub struct PkgReader<R: Read + Seek + Sized + Debug> { /* private fields */ }Expand description
Read-only interface to a single flat package XAR archive.
Implementations§
source§impl<R: Read + Seek + Sized + Debug> PkgReader<R>
impl<R: Read + Seek + Sized + Debug> PkgReader<R>
sourcepub fn new(reader: R) -> PkgResult<Self>
pub fn new(reader: R) -> PkgResult<Self>
Construct an instance from a reader.
The reader will read the contents of a XAR archive. This is likely
a .pkg file.
sourcepub fn into_inner(self) -> XarReader<R>
pub fn into_inner(self) -> XarReader<R>
Return the inner reader, consuming self.
sourcepub fn distribution(&mut self) -> PkgResult<Option<Distribution>>
pub fn distribution(&mut self) -> PkgResult<Option<Distribution>>
Obtain the parsed Distribution XML file describing the installer.
Not all flat packages have a Distribution file, so this may resolve to
None.
sourcepub fn root_component(&mut self) -> PkgResult<Option<ComponentPackageReader>>
pub fn root_component(&mut self) -> PkgResult<Option<ComponentPackageReader>>
Obtain the root component in this installer.
This will only return a component of this is a single component installer, not a product installer.
sourcepub fn component_packages(&mut self) -> PkgResult<Vec<ComponentPackageReader>>
pub fn component_packages(&mut self) -> PkgResult<Vec<ComponentPackageReader>>
Obtain component package instances in this flat package.
Component packages are the individual installable packages contained in a flat package archive.
If this is a single component installer, only a single instance will be returned. For product installers, all components are returned.