hammerspoon2-docs
    Preparing search index...

    Class HSSpotlightGroup

    A grouped set of Spotlight results that share a common metadata attribute value. Groups are returned by HSSpotlightQuery.groups() when grouping attributes have been configured with setGroupingAttributes(). Do not instantiate HSSpotlightGroup directly. When multiple grouping attributes are specified, groups nest: each group has subgroups() containing the next level of grouping.

    Index

    Constructors

    Properties

    attribute: string

    The metadata attribute name by which results in this group are clustered.

    count: number

    The number of results contained in this group.

    identifier: string

    A unique identifier for this group object (UUID string).

    Methods

    • Returns the items contained in this group as an array of HSSpotlightItem objects.

      Returns HSSpotlightItem[]

      An array of HSSpotlightItem objects

    • Returns nested subgroups when multiple grouping attributes were specified. Returns an empty array if no subgroups exist for this group.

      Returns HSSpotlightGroup[]

      An array of HSSpotlightGroup objects

    • The shared value of the grouping attribute for all results in this group. Returns null only in the unlikely case that the underlying value cannot be bridged.

      Returns any

      The attribute value (string, number, Date, etc.) or null