How does one **get** attributes for SD files? To be able to set the date and time of the files on my SD card I followed this answer: https://arduino.stackexchange.com/a/39127/49678

Now I am wondering How do I read the values out in the microcontroller?
To clearify, I get the correct timestamps when I remove the SD card and view them on a PC, but I also want to be able to read this on the microcontroller.

Inside SdFile.cpp on line 1025 there is a function called timestamp which is used to set the timestamp but I cant seem to find any function to read it.
https://github.com/adafruit/SD/blob/master/utility/SdFile.cpp

I would prefer a solution where I don't have to add it to the library myself.

The underlying problem I am facing is that I want to log files, and once the memory is full I which to remove the oldest files.
You need to get an SdFile object for your file then use the SdFile::dirEntry method to get the directory entry for the file.

The directory entry (struct directoryEntry) has the timestamps.