Function: projectile--file-kind-match

projectile--file-kind-match is a byte-compiled function defined in projectile.el.

Signature

(projectile--file-kind-match REL-PATH SPEC)

Documentation

Return REL-PATH's resource key for the kind SPEC, or nil.

REL-PATH matches the kind only when it is a member (see projectile--file-kind-member-p) and its derived key is a non-empty string (so a :key-fn returning nil, an empty string or a non-string value simply doesn't match, rather than relating unrelated files).

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--file-kind-match (rel-path spec)
  "Return REL-PATH's resource key for the kind SPEC, or nil.

REL-PATH matches the kind only when it is a member (see
`projectile--file-kind-member-p') and its derived key is a non-empty
string (so a `:key-fn' returning nil, an empty string or a non-string
value simply doesn't match, rather than relating unrelated files)."
  (when (projectile--file-kind-member-p rel-path spec)
    (let ((key (projectile--file-kind-key rel-path spec)))
      (and (stringp key) (not (string-empty-p key)) key))))