Gio::FileAttributeMatcher Class Reference
FileAttributeMatcher allows for searching through a FileInfo for attributes. More...Public Member Functions | |
| void | reference () const |
| void | unreference () const |
| GFileAttributeMatcher* | gobj () |
| Provides access to the underlying C instance. | |
| const GFileAttributeMatcher* | gobj () const |
| Provides access to the underlying C instance. | |
| GFileAttributeMatcher* | gobj_copy () const |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| bool | matches (const std::string& full_name) const |
| Checks if an attribute will be matched by an attribute matcher. | |
| bool | matches_only (const std::string& full_name) const |
| Checks if a attribute matcher only matches a given attribute. | |
| bool | enumerate_namespace (const std::string& ns) |
| Checks if the matcher will match all of the keys in a given namespace. | |
| std::string | enumerate_next () |
| Gets the next matched attribute from a FileAttributeMatcher. | |
Static Public Member Functions | |
| static Glib::RefPtr<FileAttributeMatcher> | create (const std::string& attributes="*") |
| Creates a new file attribute matcher, which matches attributes against a given string. | |
Protected Member Functions | |
| FileAttributeMatcher () | |
| void | operator delete (void*, size_t) |
Related Functions | |
| (Note that these are not member functions.) | |
| Glib::RefPtr<Gio::FileAttributeMatcher> | wrap (GFileAttributeMatcher* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Detailed Description
FileAttributeMatcher allows for searching through a FileInfo for attributes.
Constructor & Destructor Documentation
| Gio::FileAttributeMatcher::FileAttributeMatcher | ( | ) | [protected] |
Member Function Documentation
| void Gio::FileAttributeMatcher::reference | ( | ) | const |
| void Gio::FileAttributeMatcher::unreference | ( | ) | const |
| GFileAttributeMatcher* Gio::FileAttributeMatcher::gobj | ( | ) |
Provides access to the underlying C instance.
| const GFileAttributeMatcher* Gio::FileAttributeMatcher::gobj | ( | ) | const |
Provides access to the underlying C instance.
| GFileAttributeMatcher* Gio::FileAttributeMatcher::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| void Gio::FileAttributeMatcher::operator delete | ( | void * | , | |
| size_t | ||||
| ) | [protected] |
| static Glib::RefPtr<FileAttributeMatcher> Gio::FileAttributeMatcher::create | ( | const std::string & | attributes = "*" |
) | [static] |
Creates a new file attribute matcher, which matches attributes against a given string.
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.
- Parameters:
-
attributes The attributes string.
- Returns:
- a new FileAttributeMatcher.
| bool Gio::FileAttributeMatcher::matches | ( | const std::string & | full_name | ) | const |
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 A file attribute key.
- Returns:
trueif attribute matches matcher.falseotherwise.
| bool Gio::FileAttributeMatcher::matches_only | ( | const std::string & | full_name | ) | const |
Checks if a attribute matcher only matches a given attribute.
Always Returns: true if the matcher only matches attribute. false otherwise.
- Parameters:
-
attribute A file attribute key.
- Returns:
trueif the matcher only matches attribute.falseotherwise.
| bool Gio::FileAttributeMatcher::enumerate_namespace | ( | const std::string & | ns | ) |
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 A string containing a file attribute namespace.
- Returns:
trueif the matcher matches all of the entries in the given ns,falseotherwise.
| std::string Gio::FileAttributeMatcher::enumerate_next | ( | ) |
Gets the next matched attribute from a FileAttributeMatcher.
- Returns:
- A string containing the next attribute or
0if no more attribute exist.
Friends And Related Function Documentation
| Glib::RefPtr<Gio::FileAttributeMatcher> wrap | ( | GFileAttributeMatcher * | object, | |
| bool | take_copy = false | |||
| ) | [related] |
A Glib::wrap() method for this object.
- Parameters:
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns:
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
