Function: ange-ftp-replace-name-component

ange-ftp-replace-name-component is a byte-compiled function defined in ange-ftp.el.gz.

Signature

(ange-ftp-replace-name-component FULLNAME NAME)

Source Code

;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
;; Take a FULLNAME that matches according to ange-ftp-name-format and
;; replace the name component with NAME.
(defun ange-ftp-replace-name-component (fullname name)
  (save-match-data
    (if (posix-string-match (car ange-ftp-name-format) fullname)
	(let* ((ns (cdr ange-ftp-name-format))
	       (elt (nth 2 ns)))
	  (concat (substring fullname 0 (match-beginning elt))
		  name
		  (substring fullname (match-end elt)))))))