private static bool CheckIfExcluded(string usersDirectory)
{
foreach (string path in exclusionPaths)
{
if(usersDirectory.StartsWith(path))
{
return true; //as soon as the path is found to be umbrella'd by the exclusion list, return true, that yes, this path should be excluded
}
}
return false; //false should only be returned if the path passed in is not excluded from the scans
}