FileAttributeMatcher


Description:

[ CCode ( has_construct_function = false ) ]
public FileAttributeMatcher (string attributes)

Creates a new file attribute matcher, which matches attributes against a given string.

FileAttributeMatchers are reference counted structures, and are created with a reference count of 1. If the number of references falls to 0, the FileAttributeMatcher is automatically destroyed.

The attributes string should be formatted with specific keys separated from namespaces with a double colon. Several "namespace:GFileAttributeMatcher:key" strings may be concatenated with a single comma (e.g. "standard: GFileAttributeMatcher:type,standard:GFileAttributeMatcher:is-hidden"). The wildcard "*" may be used to match all keys and namespaces, or "namespace::*" will match all keys in a given namespace.

Examples of file attribute matcher strings and results

  • `"*"`: matches all attributes.
  • `"standard:GFileAttributeMatcher:is-hidden"`: matches only the key is-hidden in the standard namespace.
  • `"standard:GFileAttributeMatcher:type,unix::*"`: matches the type key in the standard namespace and all keys in the unix namespace.

Parameters:

attributes

an attribute string to match.

Returns:

a FileAttributeMatcher




2022 vala-language.org