dired-get-marked-files

dired-get-marked-files is a compiled Lisp function in `dired.el'.

(dired-get-marked-files &optional LOCALP ARG FILTER DISTINGUISH-ONE-MARKED)

Return the marked files' names as list of strings.
The list is in the same order as the buffer, that is, the car is the
first marked file.
Values returned are normally absolute file names.
Optional arg LOCALP as in `dired-get-filename'.
Optional second argument ARG, if non-nil, specifies files near
point instead of marked files. It usually comes from the prefix
argument.
If ARG is an integer, use the next ARG files.
If ARG is any other non-nil value, return the current file name.
If no files are marked, and ARG is nil, also return the current file name.
Optional third argument FILTER, if non-nil, is a function to select
some of the files--those for which (funcall FILTER FILENAME) is non-nil.

If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
return (t FILENAME) instead of (FILENAME).
Don't use that together with FILTER.