FileSystemWatcher and USB Drives

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Can someone please confirm whether or not I can use this class to basically
watch for the insertion of a USB drive? I'm suspecting not. If I try to
create a FileSystemWatcher on a drive/folder that doesn't exist, I get an
unrecoverable exception. Any information would be greatly appreciated....

- Rick
 
Hard to watch a directory that doesn't exist yet, so yes, you will need
something else.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.
 
OK, thanks, it's just that the documentation states that you can "watch for
renaming, deletion, or creation of files or directories". Sounds like that
statement needs to be clarified, then.

- Rick
 
You can only use a FSW on an existing drive, so you'll have to wait until
the drive is inserted (mouned) before you can start the FS watcher.

Willy.
 
Back
Top