I am building a .NET WinForms based application (currently using .NET 3.5).
The application writes/reads from files in certain scenarios.
I would like to be able to trace all these file writing activities (i would like the application to only write to files under its own folder, and not to any other folders such as C:\Temp)
Is there any easy way i could “sniff” on this activity and see which files are being written to (along with the stack trace perhaps)
Have you tried maybe FileSystemWatcher class?
It want give you full stack trace, but you will have at least information about writing with quite simple api.
From MSDN: