My function is pretty much a standard search function ... I have included it below.
In the function, I have 1 line of code responsible for trimming the Repart NTFS points.
if (attributes.ToString().IndexOf("ReparsePoint") == -1)
The problem is that I get the error Access to the path 'c:\System Volume Information' is denied.
I debugged the code, and only runtime attributes for this directory:
System.IO.FileAttributes.Hidden | System.IO.FileAttributes.System | System.IO.FileAttributes.Directory
I am executing this code on a Windows 2008 server machine, any ideas what I can do to cure this error?
public void DirSearch(string sDir) { foreach (string d in Directory.GetDirectories(sDir)) { DirectoryInfo dInfo = new DirectoryInfo(d); FileAttributes attributes = dInfo.Attributes; if (attributes.ToString().IndexOf("ReparsePoint") == -1) { foreach (string f in Directory.GetFiles(d, searchString)) {
source share