Answer the question
In order to leave comments, you need to log in
Why doesn't chokidar.watch capture a file change?
My task is quite simple (as it seemed to me), I needed to find out when minecraft overwrites the latest.log file in the logs folder and then operate with the changes.
I looked at how changes can be fixed and wrote (copy-pasted) the code according to the template:
const chokidar = require('chokidar');
chokidar.watch('путь к файлу').on('all', (event, path) => {
console.log(event, path);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question