list

common
abstract fun list(dir: Path): List<Path>

Returns the children of the directory identified by dir. The returned list is sorted using natural ordering. If dir is a relative path, the returned elements will also be relative paths. If it is an absolute path, the returned elements will also be absolute paths.

Throws

if dir does not exist, is not a directory, or cannot be read. A directory cannot be read if the current process doesn't have access to dir, or if there's a loop of symbolic links, or if any name is too long.

js
abstract fun list(dir: Path): List<Path>

Throws