gio.FileInfo

gio.FileInfo — File Information and Attributes

Synopsis

class gio.FileInfo(gobject.GObject):
    gio.FileInfo()
def clear_status()
def copy_into()
def dup()
def get_attribute_as_string(attribute)
def get_attribute_boolean(attribute)
def get_attribute_byte_string(attribute)
def get_attribute_data(attribute)
def get_attribute_int32(attribute)
def get_attribute_int64(attribute)
def get_attribute_object(attribute)
def get_attribute_status(attribute)
def get_attribute_string(attribute)
def get_attribute_type(attribute)
def get_attribute_uint32(attribute)
def get_attribute_uint64(attribute)
def get_content_type()
def get_display_name()
def get_edit_name()
def get_etag()
def get_file_type()
def get_icon()
def get_is_backup()
def get_is_hidden()
def get_is_symlink()
def get_modification_time()
def get_name()
def get_size()
def get_sort_order()
def get_symlink_target()
def has_attribute(attribute)
def list_attributes(name_space)
def remove_attribute(attribute)
def set_attribute(attribute, type, value_p)
def set_attribute_boolean(attribute, attr_value)
def set_attribute_byte_string(attribute, attr_value)
def set_attribute_data(attribute, attr_value)
def set_attribute_int32(attribute, attr_value)
def set_attribute_int64(attribute, attr_value)
def set_attribute_mask(mask)
def set_attribute_object(attribute, attr_value)
def set_attribute_status(attribute, attr_value)
def set_attribute_string(attribute, attr_value)
def set_attribute_uint32(attribute)
def set_attribute_uint64(attribute)
def set_content_type(content_type)
def set_display_name(display_name)
def set_edit_name(edit_name)
def set_file_type(type)
def set_icon(icon)
def set_is_hidden(is_hidden)
def set_is_symlink(is_symlink)
def set_modification_time(mtime)
def set_name(name)
def set_size(size)
def set_sort_order(sort_order)
def set_symlink_tarset(symlink_target)
def unset_attribute_mask()

Ancestry

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

Constructor

    gio.FileInfo()

Returns :

a new gio.FileInfo

Creates a new gio.FileInfo

Methods

Unfinished section, you may want to see the relevant C API docs for methods descriptions.