glibmm 2.80.0
|
Key-Value paired file attributes. More...
#include <giomm/fileattributeinfolist.h>
Public Member Functions | |
void | reference () const |
Increment the reference count for this object. | |
void | unreference () const |
Decrement the reference count for this object. | |
GFileAttributeInfoList * | gobj () |
Provides access to the underlying C instance. | |
const GFileAttributeInfoList * | gobj () const |
Provides access to the underlying C instance. | |
GFileAttributeInfoList * | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
FileAttributeInfoList ()=delete | |
FileAttributeInfoList (const FileAttributeInfoList &)=delete | |
FileAttributeInfoList & | operator= (const FileAttributeInfoList &)=delete |
operator bool () const | |
Whether the FileAttributeInfoList is valid and non empty. | |
bool | empty () const |
Whether the FileAttributeInfoList is empty or invalid. | |
FileAttributeInfo | lookup (const std::string & name) const |
Gets the file attribute with the name name from list. | |
Glib::RefPtr< FileAttributeInfoList > | dup () const |
Makes a duplicate of a file attribute info list. | |
void | add (const std::string & name, FileAttributeType type, FileAttributeInfo::Flags flags=FileAttributeInfo::Flags::NONE) |
Adds a new attribute with name to the list, setting its type and flags. | |
Static Public Member Functions | |
static Glib::RefPtr< FileAttributeInfoList > | create () |
Protected Member Functions | |
void | operator delete (void *, std::size_t) |
Related Symbols | |
(Note that these are not member symbols.) | |
Glib::RefPtr< Gio::FileAttributeInfoList > | wrap (GFileAttributeInfoList *object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
Key-Value paired file attributes.
File attributes in GIO consist of a list of key-value pairs.
Keys are strings that contain a key namespace and a key name, separated by a colon, e.g. "namespace:keyname". Namespaces are included to sort key-value pairs by namespaces for relevance. Keys can be retreived using wildcards, e.g. "standard::*" will return all of the keys in the "standard" namespace.
Values are stored within the list in Gio::FileAttributeValue structures. Values can store different types, listed in the enum Gio::FileAttributeType. Upon creation of a Gio::FileAttributeValue, the type will be set to Gio::FileAttributeType::INVALID.
The list of possible attributes for a filesystem (pointed to by a Gio::File) is availible as a Gio::FileAttributeInfoList. This list is queryable by key names as indicated earlier.
Classes that implement Gio::FileIface will create a Gio::FileAttributeInfoList and install default keys and values for their given file system, architecture, and other possible implementation details (e.g., on a UNIX system, a file attribute key will be registered for the user id for a given file).
See http://library.gnome.org/devel/gio/unstable/gio-GFileAttribute.html for the list of default namespaces and the list of default keys.
|
delete |
|
delete |
void Gio::FileAttributeInfoList::add | ( | const std::string & | name, |
FileAttributeType | type, | ||
FileAttributeInfo::Flags | flags = FileAttributeInfo::Flags::NONE |
||
) |
Adds a new attribute with name to the list, setting its type and flags.
name | The name of the attribute to add. |
type | The FileAttributeType for the attribute. |
flags | Gio::FileAttributeInfo::Flags for the attribute. |
|
static |
Glib::RefPtr< FileAttributeInfoList > Gio::FileAttributeInfoList::dup | ( | ) | const |
Makes a duplicate of a file attribute info list.
bool Gio::FileAttributeInfoList::empty | ( | ) | const |
Whether the FileAttributeInfoList is empty or invalid.
GFileAttributeInfoList * Gio::FileAttributeInfoList::gobj | ( | ) |
Provides access to the underlying C instance.
const GFileAttributeInfoList * Gio::FileAttributeInfoList::gobj | ( | ) | const |
Provides access to the underlying C instance.
GFileAttributeInfoList * Gio::FileAttributeInfoList::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
FileAttributeInfo Gio::FileAttributeInfoList::lookup | ( | const std::string & | name | ) | const |
Gets the file attribute with the name name from list.
name | The name of the attribute to lookup. |
|
explicit |
Whether the FileAttributeInfoList is valid and non empty.
|
delete |
void Gio::FileAttributeInfoList::reference | ( | ) | const |
Increment the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
void Gio::FileAttributeInfoList::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
related |
A Glib::wrap() method for this object.
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. |