I'm trying to create my own TreeView and I was experimenting by displaying
my hard drive.
For that I create a "FileSystemModel" and to make it better when I open a
folder I create a FileSystemWatcher on it so I automatically update my
representation when the directory change.
I get the list of files with Directory.GetDirectories() &
Directory.GetFiles().
I get a directory named: 'C:\System Volume Information'
I created a watcher on it, but when I executed
watcher.EnableRaisingEvents = true; the following exception was thrown:
System.IO.FileNotFoundException was unhandled
Message="Error reading the C:\\System Volume Information directory."
Now I don't get it...
I would have kind of understand some sort of SecurityException, but why
FileNotFound on a directory returned by Directory.GetDirectories()
OK, let's call that a minor bug, how do I cull out these 'dangerous' special
folders?
--
If you're in a war, instead of throwing a hand grenade at the enemy, throw
one of those small pumpkins. Maybe it'll make everyone think how stupid war
is, and while they are thinking, you can throw a real grenade at them.
Jack Handey.