Leanify
Leanify copied to clipboard
Option to keep modification time
Feature request: Add an option to keep file modification date&time.
Reason: For some files (e.g. .png) no other way to store create/modification time than in file attributes (when change the file name is undesirably).
Effect is: Make lossless optimization real lossless: keep important file information on the place.
Just in case if this gets accepted, here's how it's done -
To prevent file operations using the given handle from modifying the last write time, call SetFileTime immediately after opening the file handle and pass a FILETIME structure that has both the dwLowDateTime and dwHighDateTime members set to 0xFFFFFFFF.