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

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

Signature

(tramp-smb-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-smb.el.gz
;; This function should return "foo/" for directories and "bar" for
;; files.
(defun tramp-smb-handle-file-name-all-completions (filename directory)
  "Like `file-name-all-completions' for Tramp files."
  (tramp-skeleton-file-name-all-completions filename directory
    (all-completions
     filename
     (when (file-directory-p directory)
       (with-parsed-tramp-file-name (expand-file-name directory) nil
	 (with-tramp-file-property v localname "file-name-all-completions"
	   (mapcar
	    (lambda (x)
	      (list
	       (if (tramp-compat-string-search "d" (nth 1 x))
		   (file-name-as-directory (nth 0 x))
		 (nth 0 x))))
	    (tramp-smb-get-file-entries directory))))))))