title: Get files in directory by modifying time
body: <p>I would like to write a C++ function that fills a vector with the filename of all of the files in a directory. Furthermore, I would like this vector to be ordered by the last modified time of the files.</p>
  
  <p>I can use boost:: filesystem to read in all of the files in the directory and pass it to a vector, but these get loaded to the vector by filename and then I have stat the file and perform a sort which is not very efficient.</p>
  
  <p>Does anybody know of a quick way to do this? For instance, ls -lhctr can do it almost instantly so C++ should be able to do this very quickly for a large directory as well.</p>
  
  <p>I would also like this to have sub-millisecond resolution if possible.</p>