list

open fun list(path: String, mustExist: Boolean = true): Collection<String>

List the names of files and directories within the directory at path.

Return

collection of entry names in the directory

Parameters

path

fully qualified path of the directory to list

mustExist

if true, throws FileNotFoundException when path does not exist