Function: file-name-quoted-p

file-name-quoted-p is a byte-compiled function defined in files.el.gz.

Signature

(file-name-quoted-p NAME &optional TOP)

Documentation

Whether NAME is quoted with prefix "/:".

If NAME is a remote file name and TOP is nil, check the local part of NAME.

Other relevant functions are documented in the file-name group.

Probably introduced at or before Emacs version 26.1.

Shortdoc

;; file-name
(file-name-quoted-p "/:/tmp/foo")
    => t

Aliases

tramp-compat-file-name-quoted-p

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
(defsubst file-name-quoted-p (name &optional top)
  "Whether NAME is quoted with prefix \"/:\".
If NAME is a remote file name and TOP is nil, check the local part of NAME."
  (let ((file-name-handler-alist (unless top file-name-handler-alist)))
    (string-prefix-p "/:" (file-local-name name))))