void ProcessSourceFiles(string spec, bool recurse)
{
string path, pattern;
SplitPathAndPattern (spec, out path, out pattern);
if (pattern.IndexOf ('*') == -1) {
AddSourceFile (spec);
return;
}
string[] files = null;
try {
throw new NotSupportedException("Directory.GetFiles");
//files = Directory.GetFiles (path, pattern);
} catch (System.IO.DirectoryNotFoundException) {
report.Error (2001, "Source file `" + spec + "' could not be found");
return;
} catch (System.IO.IOException) {
report.Error (2001, "Source file `" + spec + "' could not be found");
return;
}
foreach (string f in files) {
AddSourceFile (f);
}
if (!recurse)
return;
string[] dirs = new string[0];
//try {
// dirs = Directory.GetDirectories (path);
//} catch {
//}
foreach (string d in dirs) {
// Don't include path in this string, as each
// directory entry already does
ProcessSourceFiles (d + "/" + pattern, true);
}
}