Class (GI Struct)

Gio-2.0GioFileAttributeMatcher

Determines if a string matches a file attribute.

Index

Constructors

Properties

Methods

  • Checks if the matcher will match all of the keys in a given namespace. This will always return true if a wildcard character is in use (e.g. if matcher was created with "standard::" and ns is "standard", or if matcher was created using "" and namespace is anything.)

    TODO: this is awkwardly worded.

    Parameters

    • ns: string

      a string containing a file attribute namespace.

    Returns boolean

    true if the matcher matches all of the entries in the given ns, false otherwise.

  • Checks if an attribute will be matched by an attribute matcher. If the matcher was created with the "*" matching string, this function will always return true.

    Parameters

    • attribute: string

      a file attribute key.

    Returns boolean

    true if attribute matches matcher. false otherwise.

  • Checks if an attribute matcher only matches a given attribute. Always returns false if "*" was used when creating the matcher.

    Parameters

    • attribute: string

      a file attribute key.

    Returns boolean

    true if the matcher only matches attribute. false otherwise.

  • Subtracts all attributes of subtract from matcher and returns a matcher that supports those attributes.

    Note that currently it is not possible to remove a single attribute when the matcher matches the whole namespace - or remove a namespace or attribute when the matcher matches everything. This is a limitation of the current implementation, but may be fixed in the future.

    Parameters

    Returns FileAttributeMatcher

    A file attribute matcher matching all attributes of matcher that are not matched by subtract

  • Prints what the matcher is matching against. The format will be equal to the format passed to g_file_attribute_matcher_new(). The output however, might not be identical, as the matcher may decide to use a different order or omit needless parts.

    Returns string

    a string describing the attributes the matcher matches against or null if matcher was null.

  • Unreferences matcher. If the reference count falls below 1, the matcher is automatically freed.

    Returns void