В настоящее время я закодировал ее следующим образом:
Код: Выделить всё
private void StepThroughDirectories(string dir)
{
string[] directories = Directory.GetDirectories(dir);
try
{
foreach (string d in Directory.GetDirectories(dir))
{
if (recCount < (int)Depth)
{
GetACLs(d, new DirectoryInfo(d));
pBar.Value += 1;
//MessageBox.Show("Recursive Level: " + counter.ToString());
recCount++;
StepThroughDirectories(d);
}
else
{
recCount--;
}
}
}
catch (System.Exception e)
{
Console.WriteLine(e.Message);
}
}
Подробнее здесь: https://stackoverflow.com/questions/387 ... ory-search
Мобильная версия