gio.FileInfoFile Information and AttributesSynopsisgio.FileInfogobject.GObjectgio.FileInfoclear_statuscopy_intodupget_attribute_as_stringattributeget_attribute_booleanattributeget_attribute_byte_stringattributeget_attribute_dataattributeget_attribute_int32attributeget_attribute_int64attributeget_attribute_objectattributeget_attribute_statusattributeget_attribute_stringattributeget_attribute_typeattributeget_attribute_uint32attributeget_attribute_uint64attributeget_content_typeget_display_nameget_edit_nameget_etagget_file_typeget_iconget_is_backupget_is_hiddenget_is_symlinkget_modification_timeget_nameget_sizeget_sort_orderget_symlink_targethas_attributeattributelist_attributesname_spaceremove_attributeattributeset_attributeattributetypevalue_pset_attribute_booleanattributeattr_valueset_attribute_byte_stringattributeattr_valueset_attribute_dataattributeattr_valueset_attribute_int32attributeattr_valueset_attribute_int64attributeattr_valueset_attribute_maskmaskset_attribute_objectattributeattr_valueset_attribute_statusattributeattr_valueset_attribute_stringattributeattr_valueset_attribute_uint32attributeset_attribute_uint64attributeset_content_typecontent_typeset_display_namedisplay_nameset_edit_nameedit_nameset_file_typetypeset_iconiconset_is_hiddenis_hiddenset_is_symlinkis_symlinkset_modification_timemtimeset_namenameset_sizesizeset_sort_ordersort_orderset_symlink_tarsetsymlink_targetunset_attribute_maskAncestry+-- gobject.GObject
+-- gio.FileInfo
Description
Functionality for manipulating basic metadata for files.
gio.FileInfo
implements methods for getting information that all files should contain,
and allows for manipulation of extended attributes.
See gio.FileAttribute
for more information on how GIO handles file attributes.
To obtain a gio.FileInfo
for a gio.File, use
gio.File.query_info()
(or its async variant). To obtain a
gio.FileInfo
for a file input or output stream, use
gio.FileInputStream.query_info() or
gio.FileOutputStream.query_info()
(or their async variants).
To change the actual attributes of a file, you should then set the attribute in the
gio.FileInfo and call
gio.File.set_attributes_from_info() or
gio.File.set_attributes_async()
on a gio.File.
However, not all attributes can be changed in the file. For instance, the
actual size of a file cannot be changed via
gio.FileInfo.set_size(). You may call
gio.File.query_settable_attributes() and
gio.File.query_writable_namespace()
to discover the settable attributes of a particular file at runtime.
gio.FileAttributeMatcher
allows for searching through a GFileInfo for attributes.
Constructorgio.FileInfoReturns :a new
gio.FileInfo
Creates a new gio.FileInfoMethods Unfinished section, you may want to see the relevant C API docs for methods descriptions.