Add fileCreation/getCreation create-time accessors by earlephilhower · Pull Request #7000 · esp8266/Arduino

@earlephilhower

For SDFS and LittleFS, enable a creation time accessor for files and Dir
iterators, similar to the existing fileTime/getLastWrite calls.

Remove spurious Dir::getLastWrite method (the proper and only documented
way is really Dir::fileTime).

Update json to point to new mklittlefs which copies the creation date of
files to the image.

Fixes esp8266#6992

devyte

LFS filenames are limited in size and generally very small.  Use a stack
variable instead of a dynamic allocation when performing full-path
computations.
Per review, `getCreation` -> `getCreationTime`, `fileCreation` ->
`fileCreationTime`.

The names `fileTime()` and `getLastWrite()` are inherited from ESP32
implementation and unchanged.

@earlephilhower

SdFat requries the dateTimeCallback call (global for everything) to
update dates and times on created files.

Because the callback signature doesn't have space for us to provide
any parameters, we cannot get the the File, Dir, or FS object's
dateTimeCB member.  Instead, just go with `time(null)` as the callback
function which is right in all but the most esoteric cases.

@earlephilhower

@earlephilhower

@earlephilhower

@earlephilhower

@earlephilhower

@devyte

@earlephilhower