Function: projectile--file-name-extensions

projectile--file-name-extensions is a byte-compiled function defined in projectile.el.

Signature

(projectile--file-name-extensions FILE-NAME)

Documentation

Return FILE-NAME's extensions.

The extensions, in a filename, are what follows the first '.', with the exception of a leading '.'

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile--file-name-extensions (file-name)
  "Return FILE-NAME's extensions.
The extensions, in a filename, are what follows the first '.', with the
exception of a leading '.'"
  ;;would it make sense to return nil instead of an empty string if no extensions are found?
  (setq file-name (file-name-nondirectory file-name))
  (let (extensions-start)
    (substring file-name
               (if (setq extensions-start (string-match "\\..*" file-name 1))
                   (1+ extensions-start)
                 (length file-name)))))