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 argument C-u (universal-argument) to this command, and
FILE is a symbolic link, then the command will print the type
of the target of the link 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 argument \\[universal-argument] to this command, and
FILE is a symbolic link, then the command will print the type
of the target of the link instead."
(interactive (list (dired-get-filename t) current-prefix-arg) dired-mode)
(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)
(delete-char -1))
(message "%s" (buffer-string)))))