globMatch determines whether key1 matches the pattern of key2 in glob expression.
bool globMatch(String key1, String key2) { return Glob(key2).hasMatch(key1); }