Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

win,fsevent: optionally ignore change to last access time #181

Open
drizzd opened this issue Dec 29, 2020 · 0 comments
Open

win,fsevent: optionally ignore change to last access time #181

drizzd opened this issue Dec 29, 2020 · 0 comments

Comments

@drizzd
Copy link

drizzd commented Dec 29, 2020

I am working on a real-time duplicate photo detector for Windows. I am using fs.watch to get notified of changes or new files. On Windows, the file watcher reports changes to file metadata, which includes the last access time. When the Windows explorer opens a directory, it reads each photo in the directory to create a thumbnail image. The last access time is modified, which triggers UV_CHANGE events. The duplicate photo detector has to lstat each photo to check if it has changed.

To avoid these redundant lstat's, I would like to add an option to libuv to ignore changes to the last access time, i.e., to not pass FILE_NOTIFY_CHANGE_LAST_ACCESS to ReadDirectoryChangesW in https://github.com/libuv/libuv/blob/v1.x/src/win/fs-event.c#L52. The behavior could be configured by adding another UV_FS_EVENT_* flag, such as for example UV_FS_EVENT_WRITEONLY.

Does this sound reasonable? Would you accept a patch for this, assuming that it otherwise adheres to the guidelines for contributing?

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

No branches or pull requests

1 participant