working with Directory class

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

Guest

hi,
i've used Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)
method to
return the files in a given path....

but i've a small concern here...whenever I give path like "d:\", i'm getting
an unauthorizedaccess exception...this is because i'm not able to read certain
directories like 'system volume information'...etc..

is any other alternative? how can i get the file list for a given path?
 
hi,
i've used Directory.GetFiles(path, "*.*", SearchOption.AllDirectories)
method to
return the files in a given path....

but i've a small concern here...whenever I give path like "d:\", i'm
getting
an unauthorizedaccess exception...this is because i'm not able to read
certain
directories like 'system volume information'...etc..

is any other alternative? how can i get the file list for a given path?

It.s most likely System Volume Information. I use a try/catch to get round
it.
 
Back
Top