/* Returns: TRUE if the matcher only matches @attribute. FALSE otherwise.  */
gboolean g_file_attribute_matcher_matches_only(GFileAttributeMatcher *matcher, const char *attribute)
/* Returns: TRUE if the matcher only matches @attribute. FALSE otherwise.  */
gboolean g_file_attribute_matcher_matches_only(GFileAttributeMatcher *matcher, const char *attribute)
{
  SubMatcher *sub_matcher;
  guint32 id;
  g_return_val_if_fail (attribute != NULL && *attribute != '\0', FALSE);
  if (matcher == NULL ||
      matcher->all)
    return FALSE;
  if (matcher->sub_matchers->len != 1)
    return FALSE;
  id = lookup_attribute (attribute);
  sub_matcher = &g_array_index (matcher->sub_matchers, SubMatcher, 0);
  return sub_matcher->id == id &&
         sub_matcher->mask == 0xffffffff;
}