hammerspoon2-docs
    Preparing search index...

    Variable attributeConst

    attribute: Record<string, string>

    Common Spotlight metadata attribute key shortcuts. These are plain kMDItem* string values — using them is equivalent to typing the raw key name, but they provide autocomplete and avoid typos.

    Key Attribute Description
    path kMDItemPath Absolute filesystem path
    displayName kMDItemDisplayName User-visible display name
    fsName kMDItemFSName Filename on disk
    contentType kMDItemContentType UTI content type
    contentTypeTree kMDItemContentTypeTree Full UTI conformance tree
    kind kMDItemKind Finder "Kind" string
    fileSize kMDItemFSSize File size in bytes
    creationDate kMDItemFSCreationDate Filesystem creation date
    modifiedDate kMDItemFSContentChangeDate Last content modification date
    lastUsedDate kMDItemLastUsedDate Last time the item was opened
    useCount kMDItemUseCount Number of times opened
    authors kMDItemAuthors Document authors
    title kMDItemTitle Document title
    comment kMDItemComment User comment
    keywords kMDItemKeywords Tags/keywords
    durationSeconds kMDItemDurationSeconds Media duration in seconds
    pixelWidth kMDItemPixelWidth Image/video width in pixels
    pixelHeight kMDItemPixelHeight Image/video height in pixels
    whereFroms kMDItemWhereFroms Download source URLs
    bundleIdentifier kMDItemCFBundleIdentifier App bundle identifier