diff options
| author | Lars Ingebrigtsen | 2018-05-31 13:51:45 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-05-31 13:52:32 +0200 |
| commit | 8ca42283939d458e30f74dce2bb1908257ea776f (patch) | |
| tree | 4e35ea20300d41a91f7697dae4e1c014f93ae8b3 /src | |
| parent | e50634c3543facde0ab5891548ae54aa1cd30caf (diff) | |
| download | emacs-8ca42283939d458e30f74dce2bb1908257ea776f.tar.gz emacs-8ca42283939d458e30f74dce2bb1908257ea776f.zip | |
Fdirectory_files_and_attributes doc string clarification
* src/dired.c (Fdirectory_files_and_attributes): Clarify what data
is returned.
Diffstat (limited to 'src')
| -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. |