includesExtension method
Implementation
bool includesExtension(String otherPath) {
// don't use path.extension() because we want to support extensions
// containing more than one dot, e.g. "foo.bar.txt"
return fileExtensions.isEmpty || fileExtensions.any(otherPath.endsWith);
}