Function: projectile--find-file

projectile--find-file is an interactive and byte-compiled function defined in projectile.el.

Signature

(projectile--find-file INVALIDATE-CACHE &optional FF-VARIANT)

Documentation

Jump to a project's file using completion.

With INVALIDATE-CACHE invalidates the cache first. With FF-VARIANT set to a
defun, use that instead of find-file. A typical example of such a defun
would be find-file-other-window or find-file-other-frame

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile--find-file (invalidate-cache &optional ff-variant)
  "Jump to a project's file using completion.
With INVALIDATE-CACHE invalidates the cache first.  With FF-VARIANT set to a
defun, use that instead of `find-file'.   A typical example of such a defun
would be `find-file-other-window' or `find-file-other-frame'"
  (interactive "P")
  (projectile-maybe-invalidate-cache invalidate-cache)
  (let* ((project-root (projectile-acquire-root))
         (file (projectile-completing-read "Find file: "
                                           (projectile-project-files project-root)
                                           :caller 'projectile-read-file))
         (ff (or ff-variant #'find-file)))
    (when file
      (funcall ff (expand-file-name file project-root))
      (run-hooks 'projectile-find-file-hook))))