<Collection filtering with Pair&lt;*,*?&gt; object...
# forum
r
Collection filtering with Pair<*,*?> objects Hello, I’m new to kotlin (and a novice programmer in general) and ran into a bit of a snag when iterating over a list of files and filtering them based on their “creationTime” file attribute. The main issue I ran into was dealing with the creation of a Pair during the collection filtering and handling the null case. I’m trying to find the most recently created file in a directory. This is the code I had on my first attempt: val mostRecentlyCreatedFile = Files.list(downloadFolder).use { path...