Function: ange-ftp-file-entry-p
ange-ftp-file-entry-p is a byte-compiled function defined in
ange-ftp.el.gz.
Signature
(ange-ftp-file-entry-p NAME)
Documentation
Given NAME, return whether there is a file entry for it.
Source Code
;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
(defun ange-ftp-file-entry-p (name)
"Given NAME, return whether there is a file entry for it."
(let* ((name (directory-file-name name))
(dir (file-name-directory name))
(ent (gethash dir ange-ftp-files-hashtable))
(file (ange-ftp-get-file-part name)))
(if ent
(ange-ftp-hash-entry-exists-p file ent)
(or (and (ange-ftp-allow-child-lookup dir file)
(setq ent (ange-ftp-get-files name t))
;; Try a child lookup. i.e. try to list file as a
;; subdirectory of dir. This is a good idea because
;; we may not have read permission for file's parent. Also,
;; people tend to work down directory trees anyway. We use
;; no-error ;; because if file does not exist as a subdir.,
;; then dumb hosts will give an ftp error. Smart unix hosts
;; will simply send back the ls
;; error message.
(gethash "." ent))
;; Child lookup failed, so try the parent.
(ange-ftp-hash-entry-exists-p
file (ange-ftp-get-files dir 'no-error))))))