Function: tramp-crypt-handle-file-name-all-completions

tramp-crypt-handle-file-name-all-completions is a byte-compiled function defined in tramp-crypt.el.gz.

Signature

(tramp-crypt-handle-file-name-all-completions FILENAME DIRECTORY)

Documentation

Like file-name-all-completions for Tramp files.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-crypt.el.gz
(defun tramp-crypt-handle-file-name-all-completions (filename directory)
  "Like `file-name-all-completions' for Tramp files."
  (all-completions
   filename
   (let* (completion-regexp-list
	  tramp-crypt-enabled
	  (directory (file-name-as-directory directory))
	  (enc-dir (tramp-crypt-encrypt-file-name directory)))
     (mapcar
      (lambda (x)
	(substring
	 (tramp-crypt-decrypt-file-name (concat enc-dir x))
	 (length directory)))
      (file-name-all-completions "" enc-dir)))))