I'm looping through directories on a network drive, but some directories are bad ReparsePoints
and don't actually exist.
Using Directory.Exists
returns true
after about 30 seconds, and so does new DirectoryInfo(dir).Exists
, however trying to open the folder in windows explorer returns the following error message:
I:\MyFolder is not accessible.
The network path was not found.
Trying to access the directory contents using dir.GetDirectories()
throws an exception because the path doesn't exist, and so does other methods such as dir.GetAccessControl()
.
Is there a way to determine if a network path exists or not when there is a valid ReparsePoint
for the folder?
The only folder attributes are Directory, ReparsePoint