I need to get a list of all files in my C drive which allow writing and reading, so I tried like this:
string[] files = Directory.GetFiles(@"C:\\", "*.*", SearchOption.AllDirectories);
foreach (string file in files)
{
Console.WriteLine(file);
}
But I instantly get UnauthorizedAccess Exception