Package com.tccc.kos.core.util
Class DirectoryKabSource
java.lang.Object
com.tccc.kos.core.util.DirectoryKabSource
- All Implemented Interfaces:
KabSource
- Direct Known Subclasses:
ManifestChainResolver
Implementation of
KabSource
that indexes the contents of the specified
directory. This will only index at the time the source is created so it will
not handle kabs being added or removed after creation. This is typically used
for installation from a directory where all the necessary kabs are in the directory.- Version:
- 2023-10-12
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryKabSource
(File dir) Create a newKabSource
based on the kabs in the specified directory.DirectoryKabSource
(File dir, boolean purge) Create a newKabSource
based on the kabs in the specified directory. -
Method Summary
Modifier and TypeMethodDescriptiongetKabByIdentifier
(String identifier) Return the kab file with the specified identifier.getKabs()
Return the kabs in the source.
-
Constructor Details
-
DirectoryKabSource
Create a newKabSource
based on the kabs in the specified directory. Kabs are not validated beyond standard format and cert checks. Applications should perform additional validations of any kabs as needed.- Parameters:
dir
- the directory containing kabs
-
DirectoryKabSource
Create a newKabSource
based on the kabs in the specified directory. Kabs are not validated beyond standard format and cert checks. Applications should perform additional validations of any kabs as needed.If purge flag is true, any non-kabs or kabs that fail validation will be deleted from the directory.
- Parameters:
dir
- the directory containing kabspurge
- if true, purge any non-kab or corrupt kab files
-
-
Method Details
-
getKabs
Return the kabs in the source. -
getKabByIdentifier
Description copied from interface:KabSource
Return the kab file with the specified identifier.- Specified by:
getKabByIdentifier
in interfaceKabSource
-