i need to explore different folders and i try to prevent errors instead to do a try/catch on each folder . I had an error on the 'C:\Windows\InfusedApps' folder when trying to list files.
UnauthorizedAccessException:'System.UnauthorizedAccessException: Access to the path 'C:\Windows\InfusedApps' is denied.
i would to know if there were a way to test, i tried different things but without success. By example DirectoryInfo has just the "directory" flag like a normal directory.
I tried to use ` DirectorySecurity test = FileSystemAclExtensions.GetAccessControl ( new DirectoryInfo(parent.Path)
` But i don't see how use it to detect a difference.
Thanks.