useDirectoryEntries
inline fun <T> Path.useDirectoryEntries(glob: String = "*", block: (Sequence<Path>) -> T): T(source)
Calls the block callback with a sequence of all entries in this directory optionally filtered by matching against the specified glob pattern.
Since Kotlin
1.5Return
the value returned by block.
Parameters
glob
the globbing pattern. The syntax is specified by the FileSystem.getPathMatcher method.
See also
Throws
if the glob pattern is invalid.
If this path does not refer to a directory.
If an I/O error occurs.