Package land.oras
Class CopyUtils.CopyOptions
java.lang.Object
land.oras.CopyUtils.CopyOptions
- Enclosing class:
- CopyUtils
Options for copy.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CopyUtils.CopyOptionsdeep()The copy options with includeReferrers and recursive set to true.booleanReturn whether referrers should be included in the copy.Return the optional platform filter.static CopyUtils.CopyOptionsshallow()The default copy options with includeReferrers to falsewithPlatformFilter(Set<Platform> platforms) Return a new CopyOptions with the given platform filter.
-
Method Details
-
shallow
The default copy options with includeReferrers to false- Returns:
- The default copy options
-
deep
The copy options with includeReferrers and recursive set to true.- Returns:
- The copy options with includeReferrers and recursive set to true
-
withPlatformFilter
Return a new CopyOptions with the given platform filter. When copying an index, only manifests matching one of the given platforms will be copied. The resulting index will contain only the filtered manifests and will have a different digest.- Parameters:
platforms- The platforms to filter by- Returns:
- New CopyOptions with the platform filter set
-
includeReferrers
public boolean includeReferrers()Return whether referrers should be included in the copy.- Returns:
trueif referrers should be included
-
platformFilter
Return the optional platform filter.- Returns:
- The platform filter, or
nullif not set
-