Function: ls-lisp-classify

ls-lisp-classify is a byte-compiled function defined in ls-lisp.el.gz.

Signature

(ls-lisp-classify FILEDATA)

Documentation

Append a character to file name in FILEDATA indicating the file type.

FILEDATA has the form (FILENAME . ATTRIBUTES), where ATTRIBUTES is the structure returned by file-attributes for that file.

The file type indicators are / for directories, @ for symbolic links, | for FIFOs, = for sockets, * for regular files that are executable, and nothing for other types of files.

Source Code

;; Defined in /usr/src/emacs/lisp/ls-lisp.el.gz
(defun ls-lisp-classify (filedata)
  "Append a character to file name in FILEDATA indicating the file type.

FILEDATA has the form (FILENAME . ATTRIBUTES), where ATTRIBUTES is the
structure returned by `file-attributes' for that file.

The file type indicators are `/' for directories, `@' for symbolic
links, `|' for FIFOs, `=' for sockets, `*' for regular files that
are executable, and nothing for other types of files."
  (let ((file-name (car filedata))
        (fattr (cdr filedata)))
    (cons (ls-lisp-classify-file file-name fattr) fattr)))