Leanify icon indicating copy to clipboard operation
Leanify copied to clipboard

Option to keep modification time

Open ertyz opened this issue 8 years ago • 1 comments

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.

ertyz avatar May 03 '17 13:05 ertyz

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.

Source

apankrat avatar Mar 05 '20 07:03 apankrat