W Wrapl, The Programming Language





Nil : T


GetType() : Gtk.GObject.Type.T

New(attributes @ Std.String.T) : Gtk.Gio.GFileAttributeMatcher.T

Creates a new file attribute matcher, which matches attributes against a given string. Ts are reference counted structures, and are created with a reference count of 1. If the number of references falls to 0, the T is automatically destroyed.

The attribute string should be formatted with specific keys separated from namespaces with a double colon. Several "namespace::key" strings may be concatenated with a single comma (e.g. "standard::type,standard::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 strings to use:

Table 3. File Attribute Matcher strings and results

Matcher String Matches
"*" matches all attributes.
"standard::is-hidden" matches only the key is-hidden in the standard namespace.
"standard::type,unix::*" matches the type key in the standard namespace and all keys in the unix namespace.


:"="(_ @ T, _ @ T)

:EnumerateNamespace(self @ T, ns @ Std.String.T) : Std.Symbol.T

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.

matcher a T.
ns a string containing a file attribute namespace.
Returns TRUE if the matcher matches all of the entries in the given ns, FALSE otherwise.

:EnumerateNext(self @ T) : Std.String.T

Gets the next matched attribute from a T.

matcher a T.
Returns a string containing the next attribute or NULL if no more attribute exist.

:Matches(self @ T, attribute @ Std.String.T) : Std.Symbol.T

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.

matcher a T.
attribute a file attribute key.
Returns TRUE if attribute matches matcher. FALSE otherwise.

:MatchesOnly(self @ T, attribute @ Std.String.T) : Std.Symbol.T

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

matcher a T.
attribute a file attribute key.
Returns TRUE if the matcher only matches attribute. FALSE otherwise.

:Ref(self @ T) : Gtk.Gio.GFileAttributeMatcher.T

References a file attribute matcher.

matcher a T.
Returns a T.

:Unref(self @ T) : Std.Object.T

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

matcher a T.

:"~="(_ @ T, _ @ T)