Function: ange-ftp-host-type
ange-ftp-host-type is a byte-compiled function defined in
ange-ftp.el.gz.
Signature
(ange-ftp-host-type HOST &optional USER)
Documentation
Return a symbol which represents the type of the HOST given.
If the optional argument USER is given, attempts to guess the host-type by logging in as USER.
Source Code
;; Defined in /usr/src/emacs/lisp/net/ange-ftp.el.gz
;; If ange-ftp-host-type is called with the optional user
;; argument, it will attempt to guess the host type by connecting
;; as user, if necessary. For efficiency, I have tried to give this
;; optional second argument only when necessary. Have I missed any calls
;; to ange-ftp-host-type where it should have been supplied?
(defun ange-ftp-host-type (host &optional user)
"Return a symbol which represents the type of the HOST given.
If the optional argument USER is given, attempts to guess the
host-type by logging in as USER."
(cond ((null host) 'unix)
;; Return `unix' if HOST is nil, since that's the most vanilla
;; possible return value.
((eq host ange-ftp-host-cache)
ange-ftp-host-type-cache)
;; Trigger an ftp connection, in case we need to guess at the host type.
((and user (ange-ftp-get-process host user) (eq host ange-ftp-host-cache))
ange-ftp-host-type-cache)
(t
(setq ange-ftp-host-cache host
ange-ftp-host-type-cache
(cond ((ange-ftp-dumb-unix-host host)
'dumb-unix)
;; ((and (fboundp 'ange-ftp-vos-host)
;; (ange-ftp-vos-host host))
;; 'vos)
((and (fboundp 'ange-ftp-vms-host)
(ange-ftp-vms-host host))
'vms)
((and (fboundp 'ange-ftp-mts-host)
(ange-ftp-mts-host host))
'mts)
((and (fboundp 'ange-ftp-cms-host)
(ange-ftp-cms-host host))
'cms)
((and (fboundp 'ange-ftp-bs2000-posix-host)
(ange-ftp-bs2000-posix-host host))
'text-unix) ; POSIX is a non-ASCII Unix
((and (fboundp 'ange-ftp-bs2000-host)
(ange-ftp-bs2000-host host))
'bs2000)
(t
'unix))))))