title: is there a way to find the oldest file using just the c++
body: <p>On Linux.</p>
  
  <p>I want to build a buffer of files. A new file is saved every 30 minutes . But the total number of files allowed are 'n'.</p>
  
  <p>so when 'n+1'th file is created, the oldest one has to be deleted.</p>
  
  <p>I found stuff like 'dirent.h' and 'struct stat' that can help access directory, list all files and get its properties.</p>
  
  <p>struct stat does not however the give time of creation, but just - last modified,last accessed, time of last status changed <a href="http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysstat.h.html" rel="nofollow">http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysstat.h.html</a></p>
  
  <p>Please Help.</p>
  
  <p>P.S: boost is not available right now.</p>