Package land.oras

Class CopyUtils.CopyOptions

java.lang.Object
land.oras.CopyUtils.CopyOptions
Enclosing class:
CopyUtils

public static final class CopyUtils.CopyOptions extends Object
Options for copy.
  • Method Details

    • shallow

      public static CopyUtils.CopyOptions shallow()
      The default copy options with includeReferrers to false
      Returns:
      The default copy options
    • deep

      public static CopyUtils.CopyOptions deep()
      The copy options with includeReferrers and recursive set to true.
      Returns:
      The copy options with includeReferrers and recursive set to true
    • withPlatformFilter

      public CopyUtils.CopyOptions withPlatformFilter(Set<Platform> platforms)
      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:
      true if referrers should be included
    • platformFilter

      public @Nullable Set<Platform> platformFilter()
      Return the optional platform filter.
      Returns:
      The platform filter, or null if not set