/[emacs]/emacs/lisp/eshell/esh-util.el
ViewVC logotype

Diff of /emacs/lisp/eshell/esh-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by rms, Mon Jun 10 09:02:54 2002 UTC revision 1.16.2.1 by miles, Fri Apr 4 06:20:20 2003 UTC
# Line 588  Unless optional argument INPLACE is non- Line 588  Unless optional argument INPLACE is non-
588          string)))          string)))
589    
590  (unless (fboundp 'directory-files-and-attributes)  (unless (fboundp 'directory-files-and-attributes)
591    (defun directory-files-and-attributes (dir &optional full match nosort)    (defun directory-files-and-attributes (directory &optional full match nosort)
592      (documentation 'directory-files)      "Return a list of names of files and their attributes in DIRECTORY.
593      (let ((dir (expand-file-name dir)) ange-cache)  There are three optional arguments:
594    If FULL is non-nil, return absolute file names.  Otherwise return names
595     that are relative to the specified directory.
596    If MATCH is non-nil, mention only file names that match the regexp MATCH.
597    If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
598     NOSORT is useful if you plan to sort the result yourself."
599        (let ((directory (expand-file-name directory)) ange-cache)
600        (mapcar        (mapcar
601         (function         (function
602          (lambda (file)          (lambda (file)
603            (cons file (eshell-file-attributes (expand-file-name file dir)))))           (cons file (eshell-file-attributes (expand-file-name file directory)))))
604         (directory-files dir full match nosort)))))         (directory-files directory full match nosort)))))
605    
606  (eval-when-compile  (eval-when-compile
607    (defvar ange-cache))    (defvar ange-cache))

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.16.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26