zt
08/31/2022, 3:34 AMPath
sorted such that files/folders prefixed with a .
are first, then alphabetically, and also so all folders come before files? I'm not really familiar with the sorting methods available to collections.ephemient
08/31/2022, 3:58 AMpath.listDirectoryEntries().sortedWith(
compareByDescending(Path::isDirectory)
.thenByDescending {
it.fileName.toString().startsWith(".")
}
.then(naturalOrder())
)
)