onVisitFileFailed

abstract fun onVisitFileFailed(function: (file: Path, exception: IOException) -> FileVisitResult)(source)

Overrides the corresponding function of the built FileVisitor with the provided function.

The provided callback is invoked for an entry that could not be visited for some reason. For example, when the entry's attributes could not be read, or the entry is a directory that could not be opened. Depending on the return value of the function:

By default, FileVisitor.visitFileFailed of the built file visitor re-throws the I/O exception that prevented the entry from being visited.

Since Kotlin

2.1

See also