list

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

Returns the children of 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.

Note that a path does not need to be a directory for this function to return successfully. For example, mounted storage devices may have child files but do not identify themselves as directories.

Throws

if dir does not exist or cannot be listed. A path cannot be listed 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.

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