Function: dired-show-file-type

dired-show-file-type is an autoloaded, interactive and byte-compiled function defined in dired-aux.el.gz.

Signature

(dired-show-file-type FILE &optional DEREF-SYMLINKS)

Documentation

Print the type of FILE, according to the file command.

If you give a prefix to this command, and FILE is a symbolic link, then the type of the file linked to by FILE is printed instead.

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
;;;###autoload
(defun dired-show-file-type (file &optional deref-symlinks)
  "Print the type of FILE, according to the `file' command.
If you give a prefix to this command, and FILE is a symbolic
link, then the type of the file linked to by FILE is printed
instead."
  (interactive (list (dired-get-filename t) current-prefix-arg))
  (let (process-file-side-effects)
    (with-temp-buffer
      (if deref-symlinks
	  (process-file "file" nil t t "-L" "--" file)
	(process-file "file" nil t t "--" file))
      (when (bolp)
	(backward-delete-char 1))
      (message "%s" (buffer-string)))))