Returns whether this glob matches path.
path
bool matches(String path) => matchAsPrefix(path) != null;