Function: file-local-name
file-local-name is a byte-compiled function defined in files.el.gz.
Signature
(file-local-name FILE)
Documentation
Return the local name component of FILE.
This function removes from FILE the specification of the remote host
and the method of accessing the host, leaving only the part that
identifies FILE locally on the remote system.
The returned file name can be used directly as argument of
process-file, start-file-process, or shell-command.
Probably introduced at or before Emacs version 26.1.
Aliases
tramp-compat-file-local-name
org-babel-local-file-name
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun file-local-name (file)
"Return the local name component of FILE.
This function removes from FILE the specification of the remote host
and the method of accessing the host, leaving only the part that
identifies FILE locally on the remote system.
The returned file name can be used directly as argument of
`process-file', `start-file-process', or `shell-command'."
(or (file-remote-p file 'localname) file))