private static bool matchPath(string filter, string x)
{
if (filter.Length == 0)
return true;
if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX)
return x.StartsWith(filter);
else
return x.ToLower().StartsWith(filter.ToLower());
}