Function: tramp-crypt-handle-access-file
tramp-crypt-handle-access-file is a byte-compiled function defined in
tramp-crypt.el.gz.
Signature
(tramp-crypt-handle-access-file FILENAME STRING)
Documentation
Like access-file for Tramp files.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-crypt.el.gz
;; File name primitives.
(defun tramp-crypt-handle-access-file (filename string)
"Like `access-file' for Tramp files."
(let* ((encrypt-filename (tramp-crypt-encrypt-file-name filename))
(encrypt-regexp (tramp-compat-rx (literal encrypt-filename) eos))
tramp-crypt-enabled)
(condition-case err
(access-file encrypt-filename string)
(error
(when (and (eq (car err) 'file-missing) (stringp (cadr err))
(string-match-p encrypt-regexp (cadr err)))
(setcar
(cdr err)
(replace-regexp-in-string encrypt-regexp filename (cadr err))))
(signal (car err) (cdr err))))))