Function: ange-ftp-chase-symlinks

ange-ftp-chase-symlinks is a byte-compiled function defined in ange-ftp.el.gz.

Signature

(ange-ftp-chase-symlinks FILE)

Documentation

Return the filename that FILE references, following all symbolic links.

Source Code

;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
;;;; ------------------------------------------------------------
;;;; ~/.netrc support
;;;; ------------------------------------------------------------

(defun ange-ftp-chase-symlinks (file)
  "Return the filename that FILE references, following all symbolic links."
  (let (temp)
    (while (setq temp (ange-ftp-real-file-symlink-p file))
      (setq file
	    (if (file-name-absolute-p temp)
		temp
	      ;; Wouldn't `expand-file-name' be better than `concat' ?
	      ;; It would fail when `a/b/..' != `a', tho.  --Stef
	      (concat (file-name-directory file) temp)))))
  file)