diff options
| -rw-r--r-- | src/dired.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c index c446223a0bc..115413dd6bc 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -358,6 +358,16 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. | |||
| 358 | DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, | 358 | DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, |
| 359 | Sdirectory_files_and_attributes, 1, 5, 0, | 359 | Sdirectory_files_and_attributes, 1, 5, 0, |
| 360 | doc: /* Return a list of names of files and their attributes in DIRECTORY. | 360 | doc: /* Return a list of names of files and their attributes in DIRECTORY. |
| 361 | The list returned has elements that contain the data from | ||
| 362 | `file-attributes' for each file -- with the file name prepended. So | ||
| 363 | the structure of each element is | ||
| 364 | `(FILE-NAME FILE-ATTRIBUTE1 FILE-ATTRIBUTE2 ...)'. | ||
| 365 | |||
| 366 | For instance, to get the size of the fourth element in a directory, | ||
| 367 | you could say: | ||
| 368 | |||
| 369 | (file-attribute-size (cdr (nth 3 (directory-files-and-attributes "/")))) | ||
| 370 | |||
| 361 | There are four optional arguments: | 371 | There are four optional arguments: |
| 362 | If FULL is non-nil, return absolute file names. Otherwise return names | 372 | If FULL is non-nil, return absolute file names. Otherwise return names |
| 363 | that are relative to the specified directory. | 373 | that are relative to the specified directory. |