for Each Directory Entry
inline fun Path.forEachDirectoryEntry(glob: String = "*", action: (Path) -> Unit)
Content copied to clipboard
Performs the given action on each entry in this directory optionally filtered by matching against the specified glob pattern.
Since Kotlin
1.5
See also
Parameters
glob
the globbing pattern. The syntax is specified by the FileSystem.getPathMatcher method.
Throws
if the glob pattern is invalid.
If this path does not refer to a directory.
If an I/O error occurs.