Function: cider--file-path

cider--file-path is a byte-compiled function defined in cider-common.el.

Signature

(cider--file-path PATH)

Documentation

Return PATH's local or tramp path using cider-prefer-local-resources.

If no local or remote file exists, return nil.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-common.el
(defun cider--file-path (path)
  "Return PATH's local or tramp path using `cider-prefer-local-resources'.
If no local or remote file exists, return nil."
  (let* ((local-path (funcall cider-from-nrepl-filename-function path))
         (tramp-path (and local-path (cider--client-tramp-filename local-path))))
    (cond ((equal local-path "") "")
          ((and cider-prefer-local-resources (file-exists-p local-path))
           local-path)
          ((and tramp-path (file-exists-p tramp-path))
           tramp-path)
          ((and local-path (file-exists-p local-path))
           local-path)
          (t
           (when-let* ((cider-path-translations (cider--all-path-translations)))
             (thread-last (cider--translate-path local-path 'from-nrepl :return-all)
                          (seq-filter #'file-exists-p)
                          car))))))