Function: ange-ftp-allow-child-lookup
ange-ftp-allow-child-lookup is a macro defined in ange-ftp.el.gz.
Signature
(ange-ftp-allow-child-lookup DIR FILE)
Source Code
;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
;; Return whether ange-ftp-file-entry-p and ange-ftp-get-file-entry are
;; allowed to determine if NAME is a sub-directory by listing it directly,
;; rather than listing its parent directory. This is used for efficiency so
;; that a wasted listing is not done:
;; 1. When looking for a .dired file in dired-x.el.
;; 2. The syntax of FILE and DIR make it impossible that FILE could be a valid
;; subdirectory. This is of course an OS dependent judgment.
(defmacro ange-ftp-allow-child-lookup (dir file)
`(not
(let* ((efile ,file) ; expand once.
(edir ,dir)
(parsed (ange-ftp-ftp-name edir))
(host-type (ange-ftp-host-type
(car parsed))))
(or
;; No dots in dir names in vms.
(and (eq host-type 'vms)
(string-search "." efile))
;; No subdirs in mts of cms.
(and (memq host-type '(mts cms))
(not (string-equal "/" (nth 2 parsed))))
;; No dots in pseudo-dir names in bs2000.
(and (eq host-type 'bs2000)
(string-search "." efile))))))