glibmm: Gio::FileAttributeInfoList Class Reference

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

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

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

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 * ,
std::size_t
)
protected
FileAttributeInfoList & Gio::FileAttributeInfoList::operator= ( const FileAttributeInfoList & )
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.

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.