I have a list of files and I would like to group them according to the last modification date according to the year and month of change
I've tried to do something like:
val format = new SimpleDateFormat("yyyyMM")
files.groupBy(f=> format.format((f.lastModified())))
when files is a list of type File.
I'm doing this for fun...my goal is to be able to take all the files and place them in folders according to the year and date of last modification/creation(I've seen that not all OS has a files for the creation time and that is why I'm looking at the last modified)