Interests how to catch change of files in a certain directory. So far it has occurred to compare file хеши every second (?!). Tell me - is this right? Are there any other ideas?
1 answer
Use the fs.watch function.
PS I do not quite understand how web sockets are relevant to your question.
|