listfiles

.listfiles path:{String}
directories:{Boolean = true}
fullpath:{Boolean = true}
sortby:{FileSorting = FileSorting.NONE}
order:{Ordering = Ordering.ASCENDING}
-> Iterable<String>

Lists the files located in a directory.

Return

an unordered collection of string values, each representing a file located in the directory, with extension

Parameters

path

path of the directory to list files from

directories

whether to include directories in the listing

fullpath

whether to return the absolute path of each file, rather than just the file name

sortby

criterion to sort the files by

Values

order

order to sort the files in

Values

See also

to exclude the extension from file names

Throws

if the directory does not exist or if the path is not a directory

Wiki page

File data