search

fun Path.search(glob: String): Path?

Find the file in the directory. Returns the first file found, or NULL if not found.

listDirectoryEntries(glob).firstOrNull { it.isRegularFile() }

Parameters

glob

the globbing pattern. The syntax is specified by the FileSystem.getPathMatcher method.