collectMatchingGlob
fun Path.collectMatchingGlob(globPattern: String, dotglob: Boolean = false): Pair<Path, Sequence<Path>>
Collects all Path under this directory using globPattern, as if it is invoked in a shell.
Return
A Pair containing the relative path to the root directory where the glob operation is performed, and a Sequence containing all paths matching the globPattern.
For instance, when collecting paths matching the glob expression src/ *.cpp
, the first element of the pair will contain src
,
Parameters
dotglob
If true
, includes files prefixed with .
when performing filename expansion. See here.