pathContainsComponent function
Checks if the provided path
contains any of the specified components
.
This operation is case-insensitive.
Implementation
bool pathContainsComponent(String path, Set<String> components) {
final localSystemFilePath = toLocalSystemPathFormat(path);
final a = p.split(localSystemFilePath).map((e) => e.toLowerCase());
for (final component in components) {
if (a.contains(component.toLowerCase())) {
return true;
}
}
return false;
}