G
Guest
hi,
i am reading the directory structure into a treeview. when i select a new
drive and do not have access to an existing folder; i get an acess denied -
System.UnauthorizedAccessException error. how would i check for that in the
code.
i have tried this below, but i still get the error. any help ?
If Directory.GetDirectories(subDir).IsReadOnly = True Then
'do nothing
Else
If Directory.GetDirectories(subDir).Length <> 0
Then
subNode.Nodes.Add("")
End If
End If
i am reading the directory structure into a treeview. when i select a new
drive and do not have access to an existing folder; i get an acess denied -
System.UnauthorizedAccessException error. how would i check for that in the
code.
i have tried this below, but i still get the error. any help ?
If Directory.GetDirectories(subDir).IsReadOnly = True Then
'do nothing
Else
If Directory.GetDirectories(subDir).Length <> 0
Then
subNode.Nodes.Add("")
End If
End If