Order of files in Lab 13.1
I noticed that Labs 1 and 2 for Chapter 13 are swapped in the downloadable course resources relative to the online course notes, so let me first be clear that I am referring to "Lab 13.1 - Read Directory and Write File" from the online course notes.
For this lab, I have been able to list the files under the
project directory and write them to
out.txt; however, it often does so in a different order than the expected order (in particular, my list is sorted in alphanumeric order) so I get an assertion failure, e.g.
... actual: [ '1lro5348nq3', 'ab5hmkwhvap', 'mgofil6hjz9', 'tm4q0z9dp1d', 'x637x6xphlc' ], expected: [ 'tm4q0z9dp1d', 'ab5hmkwhvap', 'x637x6xphlc', 'mgofil6hjz9', '1lro5348nq3' ], ...
Should I consider myself to have passed the lab in this case, or should the order of the listed files match that of the expected output? In the latter case, I also tried sorting the files in ascending order based on creation time (by
stat.birthtimeMs) but to no avail - perhaps the creation times of the files are too close together to be distinguished in the millisecond range?