glibmm 2.56.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gio::FileAttributeInfoList Class Referencefinal

Key-Value paired file attributes. More...

`#include <giomm/fileattributeinfolist.h>`

## Public Member Functions
void | reference () const
| Increment the reference count for this object. More...
void | unreference () const
| Decrement the reference count for this object. More...
GFileAttributeInfoList* | gobj ()
| Provides access to the underlying C instance. More...
const GFileAttributeInfoList* | gobj () const
| Provides access to the underlying C instance. More...
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. More...
| FileAttributeInfoList ()=delete
| FileAttributeInfoList (const FileAttributeInfoList&)=delete
FileAttributeInfoList& | operator= (const FileAttributeInfoList&)=delete
| operator bool () const
| Whether the FileAttributeInfoList is valid and non empty. More...
bool | empty () const
| Whether the FileAttributeInfoList is empty or invalid. More...
FileAttributeInfo | lookup (const std::string& name) const
| Gets the file attribute with the name name from list. More...
Glib::RefPtr< FileAttributeInfoList > | dup () const
| Makes a duplicate of a file attribute info list. More...
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. More...

## Static Public Member Functions
static Glib::RefPtr< FileAttributeInfoList > | create ()

## Protected Member Functions
void | operator delete (void*, std::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. More...

## 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

## ◆ FileAttributeInfoList() [1/2]

Gio::FileAttributeInfoList::FileAttributeInfoList | ( |  | ) |
| delete

## ◆ FileAttributeInfoList() [2/2]

Gio::FileAttributeInfoList::FileAttributeInfoList | ( | const FileAttributeInfoList& |  | ) |
| delete

## Member Function Documentation

## ◆ add()

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.

## ◆ create()

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

## ◆ dup()

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

Makes a duplicate of a file attribute info list.

Returns
  A copy of the given list.

## ◆ empty()

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

Whether the FileAttributeInfoList is empty or invalid.

Returns
  true if this FileAttributeInfoList is empty.

## ◆ gobj() [1/2]

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

Provides access to the underlying C instance.

## ◆ gobj() [2/2]

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

Provides access to the underlying C instance.

## ◆ gobj_copy()

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.

## ◆ lookup()

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.

## ◆ operator bool()

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

Whether the FileAttributeInfoList is valid and non empty.

Returns
  true if this FileAttributeInfoList is not empty.

## ◆ operator delete()

void Gio::FileAttributeInfoList::operator delete | ( | void * | ,
|  | std::size_t |
| ) |  |
| protected

## ◆ operator=()

FileAttributeInfoList& Gio::FileAttributeInfoList::operator= | ( | const FileAttributeInfoList& |  | ) |
| delete

## ◆ reference()

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.

## ◆ unreference()

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.

## Friends And Related Function Documentation

## ◆ wrap()

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.