glibmm: Gio::FileAttributeInfoList Class Reference

# Gio::FileAttributeInfoList Class Reference

Key-Value paired file attributes. More...

List of all members.

## Public Member Functions
void | reference () const
void | unreference () const
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.
| 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, FileAttributeInfoFlags flags=FILE_ATTRIBUTE_INFO_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
| FileAttributeInfoList ()
void | operator delete (void*, size_t)
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr < Gio::FileAttributeInfoList > | wrap (GFileAttributeInfoList* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

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::FILE_ATTRIBUTE_TYPE_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.

Since glibmm 2.16:

## Constructor & Destructor Documentation

Gio::FileAttributeInfoList::FileAttributeInfoList | ( |  | ) | `[protected]`

## Member Function Documentation

void Gio::FileAttributeInfoList::add | ( | const std::string & | name,
|  | FileAttributeType | type,
|  | FileAttributeInfoFlags | flags = `FILE_ATTRIBUTE_INFO_NONE` |
| ) |  |  |

Adds a new attribute with name to the list, setting its type and flags.

Parameters:

  | name | The name of the attribute to add.
  | type | The FileAttributeType for the attribute.
  | flags | FileAttributeInfoFlags for the attribute.

static Glib::RefPtr<FileAttributeInfoList> Gio::FileAttributeInfoList::create | ( |  | ) | `[static]`

Glib::RefPtr<FileAttributeInfoList> Gio::FileAttributeInfoList::dup | ( |  | ) | const

Makes a duplicate of a file attribute info list.

Returns:
  A copy of the given list.

bool Gio::FileAttributeInfoList::empty | ( |  | ) | const

Whether the FileAttributeInfoList is empty or invalid.

Returns:
  true if this FileAttributeInfoList is empty.

const GFileAttributeInfoList* Gio::FileAttributeInfoList::gobj | ( |  | ) | const

Provides access to the underlying C instance.

GFileAttributeInfoList* Gio::FileAttributeInfoList::gobj | ( |  | ) |

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.

Parameters:

  | name | The name of the attribute to lookup.

Returns:
  A FileAttributeInfo for the name.

Gio::FileAttributeInfoList::operator bool | ( |  | ) | const

Whether the FileAttributeInfoList is valid and non empty.

Returns:
  true if this FileAttributeInfoList is not empty.

void Gio::FileAttributeInfoList::operator delete | ( | void * | ,
|  | size_t |  |
| ) |  |  | `[protected]`

void Gio::FileAttributeInfoList::reference | ( |  | ) | const

void Gio::FileAttributeInfoList::unreference | ( |  | ) | const

## Friends And Related Function Documentation

Glib::RefPtr< Gio::FileAttributeInfoList > wrap | ( | GFileAttributeInfoList * | 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:

- giomm/fileattributeinfolist.h