Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to keep modification time #35

Open
ertyz opened this issue May 3, 2017 · 1 comment
Open

Option to keep modification time #35

ertyz opened this issue May 3, 2017 · 1 comment

Comments

@ertyz
Copy link

ertyz commented May 3, 2017

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.

@apankrat
Copy link

apankrat commented Mar 5, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants