The class that starts when the file is changed

I want to save the actual version of each file name to a text file. And I want to update the text file if the file changes

How can I see if a file has changed in this directory? for example, change the name or file size, for example? using c #

I tried to view all the files using System.IO in a loop every 10 seconds, but I hope there is a better way to do

Is there a class in C # that starts when files change?

+4
source share
1 answer

Yes there is

FileSystemWatcher

+5
source

Source: https://habr.com/ru/post/1397093/


All Articles