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)) |