Another layer in program? I don't know...
This class seems like you should know in advance to which files you have permission and to which you does not in order to use it.
If i understood your code correctly you want to search recursively some path. Hm...
Can't you do something like this (I'm sorry for C# but i really hate languages with syntax BEGIN ... EN like in VB)?
public void search(string path)
{
string[] files = new string[0],
dirs = new string[0];
try
{
files = Directory.GetFiles(path,"*.*",SearchOption.TopDirectoryOnly);
dirs = Directory.GetDirectories(path);
}
catch(UnautorizedAccessExxeption e)
{
//do something with Exception
}
foreach(var file in files)
{
//list finded files or do something with them
}
foreach(var dir in dirs)
{
//go deeper in tree
search(dir);
}
}
This code will handle exception when you will try access files that you cant but not stop there and just go to another brunch in tree.
I hope it will help you!
#Edited
Try swapping a function i posted here with line of code
Dim files() As FileInfo = myDir.GetFiles("*.*", SearchOption.AllDirectories)
and in that fuction aggregate all files matching your parameters.
It should work fine :)