Function: tramp-crypt-file-name-p

tramp-crypt-file-name-p is a byte-compiled function defined in tramp-crypt.el.gz.

Signature

(tramp-crypt-file-name-p NAME)

Documentation

Return the encrypted remote directory NAME belongs to.

If NAME doesn't belong to an encrypted remote directory, return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-crypt.el.gz
;; It must be a `defsubst' in order to push the whole code into
;; tramp-loaddefs.el.  Otherwise, there would be recursive autoloading.
;;;###tramp-autoload
(defsubst tramp-crypt-file-name-p (name)
  "Return the encrypted remote directory NAME belongs to.
If NAME doesn't belong to an encrypted remote directory, return nil."
  (catch 'crypt-file-name-p
    (and tramp-crypt-enabled (stringp name)
	 (not (tramp-compat-file-name-quoted-p name))
	 (not (string-suffix-p tramp-crypt-encfs-config name))
	 (dolist (dir tramp-crypt-directories)
	   (and (string-prefix-p
		 dir (file-name-as-directory (expand-file-name name)))
		(throw  'crypt-file-name-p dir))))))