October 2004
Intermediate to advanced
336 pages
6h 27m
English
This function sorts all the files in a directory tree by modification time.
To obtain the modification time, the program calls the built-in function stat(). This returns a list with 13 elements. The modification time is the 10th element of this list; the rest can be ignored.
To display the modification time, the program calls localtime(), which returns a nine-element list. The program cares only about the first six, which are seconds, minutes, hours, day, month, and year, except the month is zero-based and the year has 1900 subtracted from it. (The other three elements in the list are day of the week, day ...
Read now
Unlock full access