Function: find-lisp-format
find-lisp-format is a byte-compiled function defined in
find-lisp.el.gz.
Signature
(find-lisp-format FILE-NAME FILE-ATTR SWITCHES NOW)
Documentation
Format one line of long ls output for file or directory FILE-NAME.
FILE-ATTR and FILE-SIZE give the file's attributes and size. SWITCHES and TIME-INDEX give the full switch list and time data.
Source Code
;; Defined in /usr/src/emacs/lisp/find-lisp.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lifted from ls-lisp. We don't want to require it, because that
;; would alter the insert-directory function.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun find-lisp-format (file-name file-attr switches now)
"Format one line of long `ls' output for file or directory FILE-NAME.
FILE-ATTR and FILE-SIZE give the file's attributes and size.
SWITCHES and TIME-INDEX give the full switch list and time data."
(let ((file-type (file-attribute-type file-attr)))
(concat (and (memq ?i switches) ; inode number
(format "%6d " (file-attribute-inode-number file-attr)))
(and (memq ?s switches) ; size in K
(format "%4d " (1+ (/ (file-attribute-size file-attr) 1024))))
(file-attribute-modes file-attr)
(format " %3d %-8s %-8s %8d "
(file-attribute-link-number file-attr)
(if (numberp (file-attribute-user-id file-attr))
(int-to-string (file-attribute-user-id file-attr))
(file-attribute-user-id file-attr))
(if (eq system-type 'ms-dos)
"root" ; everything is root on MSDOS.
(if (numberp (file-attribute-group-id file-attr))
(int-to-string (file-attribute-group-id file-attr))
(file-attribute-group-id file-attr)))
(file-attribute-size file-attr))
(find-lisp-format-time file-attr switches now)
" "
file-name
(and (eq t file-type) (memq ?F switches)
"/") ; Add `/' for dir if `F' switch
(and (stringp file-type)
(concat " -> " file-type)) ; Add " -> " for symbolic link
"\n")))