Package: gio

Class gio:file-info

Superclasses

gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

None

Details

The g:file-info class implements methods for getting information that all files should contain, and allows for manipulation of extended attributes. See the file attributes document for more information on how GIO handles file attributes. To obtain a g:file-info object for a g:file object, use the g:file-query-info function or its async variant.

To change the actual attributes of a file, you should then set the attribute in the g:file-info object and call the g:file-set-attributes-from-info or g:file-set-attributes-async functions on a g:file instance.

However, not all attributes can be changed in the file. For instance, the actual size of a file cannot be changed via the g:file-info-set-size function. You may call the g:file-query-settable-attributes and g:file-query-writable-namespaces function to discover the settable attributes of a particular file at runtime.

The direct accessors, such as the g:file-info-name function, are slightly more optimized than the generic attribute accessors, such as the g:file-info-attribute-byte-string function.This optimization will matter only if calling the API in a tight loop.

It is an error to call these accessors without specifying their required file attributes when creating the g:file-info instance. Use the g:file-info-has-attribute or g:file-info-list-attributes functions to check what attributes are specified for a g:file-info instance.

The g:file-attribute-matcher instance allows for searching through a g:file-info instance for attributes.
 

Returned by

Inherited Slot Access Functions

See also

2024-12-28