diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dired.c b/src/dired.c index 115413dd6bc..a753b1930e6 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -358,17 +358,14 @@ 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 | 361 | Value is a list of the form: |
| 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 | 362 | ||
| 366 | For instance, to get the size of the fourth element in a directory, | 363 | ((FILE1 FILE1-ATTRS) (FILE2 FILE2-ATTRS) ...) |
| 367 | you could say: | ||
| 368 | 364 | ||
| 369 | (file-attribute-size (cdr (nth 3 (directory-files-and-attributes "/")))) | 365 | where each FILEn-ATTRS is the attributes of FILEn as returned |
| 366 | by `file-attributes'. | ||
| 370 | 367 | ||
| 371 | There are four optional arguments: | 368 | This function accepts four optional arguments: |
| 372 | If FULL is non-nil, return absolute file names. Otherwise return names | 369 | If FULL is non-nil, return absolute file names. Otherwise return names |
| 373 | that are relative to the specified directory. | 370 | that are relative to the specified directory. |
| 374 | If MATCH is non-nil, mention only file names that match the regexp MATCH. | 371 | If MATCH is non-nil, mention only file names that match the regexp MATCH. |