We wish to sort a set of arbitrary files by the order in which they were created. We cannot however rely on the system clock (hence the 'created at' time), file name, or time since reboot (e.g. millis
).
We do however have a linux operating system and file system. We should therefore be able to use the inode
ids of the file to order them.
Create some files, resetting the system clock in between each creation. The files will start with a number that is deliberately out of sequence in order to show that we're not sorting just by name.