Function: url-handler-file-remote-p
url-handler-file-remote-p is a byte-compiled function defined in
url-handlers.el.gz.
Signature
(url-handler-file-remote-p FILENAME &optional IDENTIFICATION CONNECTED)
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-handlers.el.gz
(defun url-handler-file-remote-p (filename &optional identification _connected)
(let ((url (url-generic-parse-url filename)))
(if (and (url-type url) (not (equal (url-type url) "file")))
;; Maybe we can find a suitable check for CONNECTED. For now,
;; we ignore it.
(cond
((eq identification 'method) (url-type url))
((eq identification 'user) (url-user url))
((eq identification 'host) (url-host url))
((eq identification 'localname) (url-filename url))
(t (url-recreate-url
(url-parse-make-urlobj (url-type url) (url-user url) nil
(url-host url) (url-port url)))))
;; If there is no URL type, or it is a "file://" URL, the
;; filename is expected to be non remote. A more subtle check
;; for "file://" URLs could be applied, as said in
;; `url-handler-unhandled-file-name-directory'.
nil)))