Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Im using C#.
There is an option to monitor file access by thread (single or multi) in real time? and when thread access to the specific file i would like to fire event.
I've found ways to watch directories or files change, but in my case the file is not gonna change
Thanks a lot.
Posted
Updated 26-Mar-12 21:21pm
v3
Comments
Oshtri Deka 27-Mar-12 4:29am    
Can you share some code?

1 solution

Hi,

If you are using WinForms you can use FileSystemWatcher object for watching a file or folder.

Regards
 
Share this answer
 
Comments
Oshtri Deka 27-Mar-12 8:18am    
I agree, it's simpler and efficient.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900