Would something like
private List GetFiles(string path, params string[] patterns)
{
List files = new List();
foreach (string pattern in patterns)
{
files.AddRange(Directory.GetFiles(path, pattern));
}
return files;
}
not do the trick?
Not sure what you mean about an access violation returning an empty array though - do you mean a folder containing a file a user doesn't have permission to, the user not having permission to the folder itself or something else?