Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
80 views
in Information Technology by (110k points)
closed by
Which of the following class in C# is used to monitor the files on your system by programming?
1. FileSystemWatcher Class
2. FileSystemMonitor Class
3. FileWatcher Class
4. SystemWatcher Class

1 Answer

0 votes
by (105k points)
selected by
 
Best answer
Correct Answer - Option 1 : FileSystemWatcher Class

  C# FileSystemWatcher listens to the file system and places a watch on a directory, its subdirectories, and files and notifies if any changes are made to the directory. This class is useful when you need to auto-update the updates in a directory.

For example, if you want to create an auto-backup of a folder, you can implement a File system watcher service that watches a directory or entire machine and find when and what changes are made, and copy the changes to the backup device.

C# FileSystemWatcher acts as a watchdog for file system changes and raises an event when a change occurs. You must specify a directory to be monitored. The class can monitor changes to subdirectories and files within the specified directory.

Hence the correct answer is FileSystemWatcher Class.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...