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

How to handle the MODIFIED event when copying files etc.. #27

Open
dasmikko opened this issue Jun 28, 2017 · 1 comment
Open

How to handle the MODIFIED event when copying files etc.. #27

dasmikko opened this issue Jun 28, 2017 · 1 comment

Comments

@dasmikko
Copy link

I'm working on a filesync app, that watches for changes, new files and so on.

I've noticed on Windows that the MODIFIED event fires multiple times when copying a file to the folder.

The same thing happens when you copy a file in the same folder.

This is kinda an issue for me, as i only need the event once per file.

How should one handle this?

@wmertens
Copy link

You could use a debounce like lodash has. Then you can decide how long to wait after the last modified event for the file to be deemed "changed".

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

No branches or pull requests

2 participants