1.34 <GFileInfo>

Class: <GFileInfo>

It derives from <GObject>.

Stores information about a file system object referenced by a <GFile>.

Functionality for manipulating basic metadata for files. <GFileInfo> 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 <GFileInfo> for a <GFile>, use file:query-info (or its async variant). To obtain a <GFileInfo> for a file input or output stream, use file-input-stream:query-info or file-output-stream:query-info (or their async variants).

To change the actual attributes of a file, you should then set the attribute in the <GFileInfo> and call file:set-attributes-from-info? or file:set-attributes-async on a <GFile>.

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

The direct accessors, such as file-info:get-name, are slightly more optimized than the generic attribute accessors, such as file-info:get-attribute-byte-string.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 <GFileInfo>. Use file-info:has-attribute? or file-info:list-attributes to check what attributes are specified for a <GFileInfo>.

<GFileAttributeMatcher> allows for searching through a <GFileInfo> for attributes.

Procedures

Method: file-info:clear-status self
Method: clear-status self

Clears the status information from self.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

Method: file-info:copy-into self dest-info
Method: copy-into self dest-info

First clears all of the GFileAttribute of dest-info, and then copies all of the file attributes from self to dest-info.

self

Passed: a <GFileInfo>.

source to copy attributes from.

dest-info

Passed: a <GFileInfo>.

destination to copy attributes to.

Method: file-info:dup self ⇒ %return
Method: dup self ⇒ %return

Duplicates a file info structure.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GFileInfo>.

a duplicate <GFileInfo> of self.

Method: file-info:get-access-date-time self ⇒ %return
Method: get-access-date-time self ⇒ %return

Gets the access time of the current self and returns it as a <GDateTime>.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_TIME_ACCESS. If G_FILE_ATTRIBUTE_TIME_ACCESS_USEC is provided, the resulting <GDateTime> will additionally have microsecond precision.

If nanosecond precision is needed, G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC must be queried separately using file-info:get-attribute-uint32.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GDateTime>, or #f.

access time, or #f if unknown

Method: file-info:get-attribute-as-string self attribute ⇒ %return
Method: get-attribute-as-string self attribute ⇒ %return

Gets the value of an attribute, formatted as a human readable string.

This escapes things as needed to make the string valid UTF-8 and readable by humans. It’s not meant to be a machine readable or reversible escaping format.

To format file name attributes of type Gio.FileAttributeType.BYTE_STRING for output as UTF-8, use filename-to-utf8 instead:

const char *trash_orig_path_byte_string;
g_autofree char *trash_orig_path_utf8 = NULL;

trash_orig_path_byte_string = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH);
trash_orig_path_utf8 = g_filename_to_utf8 (trash_orig_path_byte_string, -1, NULL, NULL, NULL);
if (trash_orig_path_utf8 != NULL)
  g_message ("Some larger UTF-8 string with filename embedded as %s", trash_orig_path_utf8);
self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a string, or #f.

a UTF-8 string associated with the given attribute, or #f if the attribute wasn’t set. When you’re done with the string it must be freed with byte-array:free.

Method: file-info:get-attribute-boolean? self attribute ⇒ %return
Method: get-attribute-boolean? self attribute ⇒ %return

Gets the value of a boolean attribute. If the attribute does not contain a boolean value, #f will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a boolean.

the boolean value contained within the attribute.

Method: file-info:get-attribute-byte-string self attribute ⇒ %return
Method: get-attribute-byte-string self attribute ⇒ %return

Gets the value of a byte string attribute. If the attribute does not contain a byte string, #f will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a string, or #f.

the contents of the attribute value as a byte string, or #f otherwise.

Method: file-info:get-attribute-data self attribute ⇒ %return type value-pp status
Method: get-attribute-data self attribute ⇒ %return type value-pp status

Gets the attribute type, value and status for an attribute key.

self

Passed: a <GFileInfo>.

a <GFileInfo>

attribute

Passed: a string.

a file attribute key

%return

Returned: a boolean.

#t if self has an attribute named attribute, #f otherwise.

type

Returned: a <GFileAttributeType>.

return location for the attribute type, or #f

value-pp

Returned: a foreign pointer.

return location for the attribute value, or #f; the attribute value will not be #f

status

Returned: a <GFileAttributeStatus>.

return location for the attribute status, or #f

Method: file-info:get-attribute-file-path self attribute ⇒ %return
Method: get-attribute-file-path self attribute ⇒ %return

Gets the value of a byte string attribute as a file path.

If the attribute does not contain a byte string, NULL will be returned.

This function is meant to be used by language bindings that have specific handling for Unix paths.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a file name, as a string, or #f.

the contents of the attribute value as a file path, or #f otherwise.

Method: file-info:get-attribute-int32 self attribute ⇒ %return
Method: get-attribute-int32 self attribute ⇒ %return

Gets a signed 32-bit integer contained within the attribute. If the attribute does not contain a signed 32-bit integer, or is invalid, 0 will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a 32-bit integer.

a signed 32-bit integer from the attribute.

Method: file-info:get-attribute-int64 self attribute ⇒ %return
Method: get-attribute-int64 self attribute ⇒ %return

Gets a signed 64-bit integer contained within the attribute. If the attribute does not contain a signed 64-bit integer, or is invalid, 0 will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a 64-bit integer.

a signed 64-bit integer from the attribute.

Method: file-info:get-attribute-object self attribute ⇒ %return
Method: get-attribute-object self attribute ⇒ %return

Gets the value of a <GObject> attribute. If the attribute does not contain a <GObject>, #f will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a <GObject>, or #f.

a <GObject> associated with the given attribute, or #f otherwise.

Method: file-info:get-attribute-status self attribute ⇒ %return
Method: get-attribute-status self attribute ⇒ %return

Gets the attribute status for an attribute key.

self

Passed: a <GFileInfo>.

a <GFileInfo>

attribute

Passed: a string.

a file attribute key

%return

Returned: a <GFileAttributeStatus>.

a <GFileAttributeStatus> for the given attribute, or unset if the key is invalid.

Method: file-info:get-attribute-string self attribute ⇒ %return
Method: get-attribute-string self attribute ⇒ %return

Gets the value of a string attribute. If the attribute does not contain a string, #f will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a string, or #f.

the contents of the attribute value as a UTF-8 string, or #f otherwise.

Method: file-info:get-attribute-stringv self attribute ⇒ %return
Method: get-attribute-stringv self attribute ⇒ %return

Gets the value of a stringv attribute. If the attribute does not contain a stringv, #f will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a vector, each a string, or #f.

the contents of the attribute value as a stringv, or #f otherwise. Do not free. These returned strings are UTF-8.

Method: file-info:get-attribute-type self attribute ⇒ %return
Method: get-attribute-type self attribute ⇒ %return

Gets the attribute type for an attribute key.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a <GFileAttributeType>.

a <GFileAttributeType> for the given attribute, or invalid if the key is not set.

Method: file-info:get-attribute-uint32 self attribute ⇒ %return
Method: get-attribute-uint32 self attribute ⇒ %return

Gets an unsigned 32-bit integer contained within the attribute. If the attribute does not contain an unsigned 32-bit integer, or is invalid, 0 will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: an unsigned 32-bit integer.

an unsigned 32-bit integer from the attribute.

Method: file-info:get-attribute-uint64 self attribute ⇒ %return
Method: get-attribute-uint64 self attribute ⇒ %return

Gets a unsigned 64-bit integer contained within the attribute. If the attribute does not contain an unsigned 64-bit integer, or is invalid, 0 will be returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: an unsigned 64-bit integer.

a unsigned 64-bit integer from the attribute.

Method: file-info:get-content-type self ⇒ %return
Method: get-content-type self ⇒ %return

Gets the file’s content type.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a string, or #f.

a string containing the file’s content type, or #f if unknown.

Method: file-info:get-creation-date-time self ⇒ %return
Method: get-creation-date-time self ⇒ %return

Gets the creation time of the current self and returns it as a <GDateTime>.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_TIME_CREATED. If G_FILE_ATTRIBUTE_TIME_CREATED_USEC is provided, the resulting <GDateTime> will additionally have microsecond precision.

If nanosecond precision is needed, G_FILE_ATTRIBUTE_TIME_CREATED_NSEC must be queried separately using file-info:get-attribute-uint32.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GDateTime>, or #f.

creation time, or #f if unknown

Method: file-info:get-deletion-date self ⇒ %return
Method: get-deletion-date self ⇒ %return

Returns the <GDateTime> representing the deletion date of the file, as available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, #f is returned.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GDateTime>, or #f.

a <GDateTime>, or #f.

Method: file-info:get-display-name self ⇒ %return
Method: get-display-name self ⇒ %return

Gets a display name for a file. This is guaranteed to always be set.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a string.

a string containing the display name.

Method: file-info:get-edit-name self ⇒ %return
Method: get-edit-name self ⇒ %return

Gets the edit name for a file.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a string.

a string containing the edit name.

Method: file-info:get-etag self ⇒ %return
Method: get-etag self ⇒ %return

Gets the [entity tag][iface@Gio.File#entity-tags] for a given <GFileInfo>. See G_FILE_ATTRIBUTE_ETAG_VALUE.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_ETAG_VALUE.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a string, or #f.

a string containing the value of the "etag:value" attribute.

Method: file-info:get-file-type self ⇒ %return
Method: get-file-type self ⇒ %return

Gets a file’s type (whether it is a regular file, symlink, etc). This is different from the file’s content type, see file-info:get-content-type.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_TYPE.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GFileType>.

a <GFileType> for the given file.

Method: file-info:get-icon self ⇒ %return
Method: get-icon self ⇒ %return

Gets the icon for a file.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_ICON.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GIcon>, or #f.

<GIcon> for the given self.

Method: file-info:get-is-backup? self ⇒ %return
Method: get-is-backup? self ⇒ %return

Checks if a file is a backup file.

The exact semantics of what constitutes a backup file are backend-specific. For local files, a file is considered a backup if its name ends with ~ and it is a regular file. This follows the POSIX convention used by text editors such as Emacs.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a boolean.

#t if file is a backup file, #f otherwise.

Method: file-info:get-is-hidden? self ⇒ %return
Method: get-is-hidden? self ⇒ %return

Checks if a file is hidden.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a boolean.

#t if the file is a hidden file, #f otherwise.

Checks if a file is a symlink.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a boolean.

#t if the given self is a symlink.

Method: file-info:get-modification-date-time self ⇒ %return
Method: get-modification-date-time self ⇒ %return

Gets the modification time of the current self and returns it as a <GDateTime>.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_TIME_MODIFIED. If G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting <GDateTime> will additionally have microsecond precision.

If nanosecond precision is needed, G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC must be queried separately using file-info:get-attribute-uint32.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GDateTime>, or #f.

modification time, or #f if unknown

Method: file-info:get-name self ⇒ %return
Method: get-name self ⇒ %return

Gets the name for a file. This is guaranteed to always be set.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_NAME.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a file name, as a string.

a string containing the file name.

Method: file-info:get-size self ⇒ %return
Method: get-size self ⇒ %return

Gets the file’s size (in bytes). The size is retrieved through the value of the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute and is converted from guint64 to goffset before returning the result.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_SIZE.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a 64-bit integer.

a goffset containing the file’s size (in bytes).

Method: file-info:get-sort-order self ⇒ %return
Method: get-sort-order self ⇒ %return

Gets the value of the sort_order attribute from the <GFileInfo>. See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a 32-bit integer.

a gint32 containing the value of the "standard::sort_order" attribute.

Method: file-info:get-symbolic-icon self ⇒ %return
Method: get-symbolic-icon self ⇒ %return

Gets the symbolic icon for a file.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a <GIcon>, or #f.

<GIcon> for the given self.

Gets the symlink target for a given <GFileInfo>.

It is an error to call this if the <GFileInfo> does not contain G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

%return

Returned: a file name, as a string, or #f.

a string containing the symlink target.

Method: file-info:has-attribute? self attribute ⇒ %return
Method: has-attribute? self attribute ⇒ %return

Checks if a file info structure has an attribute named attribute.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

%return

Returned: a boolean.

#t if self has an attribute named attribute, #f otherwise.

Method: file-info:has-namespace? self name-space ⇒ %return
Method: has-namespace? self name-space ⇒ %return

Checks if a file info structure has an attribute in the specified name-space.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

name-space

Passed: a string.

a file attribute namespace.

%return

Returned: a boolean.

#t if self has an attribute in name-space, #f otherwise.

Method: file-info:list-attributes self [name-space] ⇒ %return
Method: list-attributes self [name-space] ⇒ %return

Lists the file info structure’s attributes.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

name-space

Passed, or left out: a string, or #f.

a file attribute key’s namespace, or #f to list all attributes.

%return

Returned: a vector, each a string, or #f.

a null-terminated array of strings of all of the possible attribute types for the given name-space, or #f on error.

Procedure: file-info:new ⇒ %return

Creates a new file info structure.

%return

Returned: a <GFileInfo>.

a <GFileInfo>.

Method: file-info:remove-attribute self attribute
Method: remove-attribute self attribute

Removes all cases of attribute from self if it exists.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

Method: file-info:set-access-date-time self atime
Method: set-access-date-time self atime

Sets the G_FILE_ATTRIBUTE_TIME_ACCESS and G_FILE_ATTRIBUTE_TIME_ACCESS_USEC attributes in the file info to the given date/time value.

G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC will be cleared.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

atime

Passed: a <GDateTime>.

a <GDateTime>.

Method: file-info:set-attribute self attribute type value-p
Method: set-attribute self attribute type value-p

Sets the attribute to contain the given value, if possible. To unset the attribute, use invalid for type.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

type

Passed: a <GFileAttributeType>, or one of its symbols.

a <GFileAttributeType>

value-p

Passed: a foreign pointer, or a bytevector.

pointer to the value

Method: file-info:set-attribute-boolean self attribute attr-value
Method: set-attribute-boolean self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: a boolean.

a boolean value.

Method: file-info:set-attribute-byte-string self attribute attr-value
Method: set-attribute-byte-string self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: a string.

a byte string.

Method: file-info:set-attribute-file-path self attribute attr-value
Method: set-attribute-file-path self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

This function is meant to be used by language bindings that have specific handling for Unix paths.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: a file name, as a string.

a file path.

Method: file-info:set-attribute-int32 self attribute attr-value
Method: set-attribute-int32 self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: a 32-bit integer.

a signed 32-bit integer

Method: file-info:set-attribute-int64 self attribute attr-value
Method: set-attribute-int64 self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

attribute name to set.

attr-value

Passed: a 64-bit integer.

int64 value to set attribute to.

Method: file-info:set-attribute-mask self mask
Method: set-attribute-mask self mask

Sets mask on self to match specific attribute types.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

mask

Passed: a <GFileAttributeMatcher>.

a <GFileAttributeMatcher>.

Method: file-info:set-attribute-object self attribute attr-value
Method: set-attribute-object self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: a <GObject>.

a <GObject>.

Method: file-info:set-attribute-status? self attribute status ⇒ %return
Method: set-attribute-status? self attribute status ⇒ %return

Sets the attribute status for an attribute key. This is only needed by external code that implement file:set-attributes-from-info? or similar functions.

The attribute must exist in self for this to work. Otherwise #f is returned and self is unchanged.

self

Passed: a <GFileInfo>.

a <GFileInfo>

attribute

Passed: a string.

a file attribute key

status

Passed: a <GFileAttributeStatus>, or one of its symbols.

a <GFileAttributeStatus>

%return

Returned: a boolean.

#t if the status was changed, #f if the key was not set.

Method: file-info:set-attribute-string self attribute attr-value
Method: set-attribute-string self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: a string.

a UTF-8 string.

Method: file-info:set-attribute-stringv self attribute attr-value
Method: set-attribute-stringv self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

Sinze: 2.22

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key

attr-value

Passed: a list or vector, each a string.

a #f terminated array of UTF-8 strings.

Method: file-info:set-attribute-uint32 self attribute attr-value
Method: set-attribute-uint32 self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: an unsigned 32-bit integer.

an unsigned 32-bit integer.

Method: file-info:set-attribute-uint64 self attribute attr-value
Method: set-attribute-uint64 self attribute attr-value

Sets the attribute to contain the given attr-value, if possible.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

attribute

Passed: a string.

a file attribute key.

attr-value

Passed: an unsigned 64-bit integer.

an unsigned 64-bit integer.

Method: file-info:set-content-type self content-type
Method: set-content-type self content-type

Sets the content type attribute for a given <GFileInfo>. See G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

content-type

Passed: a string.

a content type.

Method: file-info:set-creation-date-time self creation-time
Method: set-creation-date-time self creation-time

Sets the G_FILE_ATTRIBUTE_TIME_CREATED and G_FILE_ATTRIBUTE_TIME_CREATED_USEC attributes in the file info to the given date/time value.

G_FILE_ATTRIBUTE_TIME_CREATED_NSEC will be cleared.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

creation-time

Passed: a <GDateTime>.

a <GDateTime>.

Method: file-info:set-display-name self display-name
Method: set-display-name self display-name

Sets the display name for the current <GFileInfo>. See G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

display-name

Passed: a string.

a string containing a display name.

Method: file-info:set-edit-name self edit-name
Method: set-edit-name self edit-name

Sets the edit name for the current file. See G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

edit-name

Passed: a string.

a string containing an edit name.

Method: file-info:set-file-type self type
Method: set-file-type self type

Sets the file type in a <GFileInfo> to type. See G_FILE_ATTRIBUTE_STANDARD_TYPE.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

type

Passed: a <GFileType>, or one of its symbols.

a <GFileType>.

Method: file-info:set-icon self icon
Method: set-icon self icon

Sets the icon for a given <GFileInfo>. See G_FILE_ATTRIBUTE_STANDARD_ICON.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

icon

Passed: a <GIcon>.

a <GIcon>.

Method: file-info:set-is-hidden self is-hidden
Method: set-is-hidden self is-hidden

Sets the "is_hidden" attribute in a <GFileInfo> according to is-hidden. See G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

is-hidden

Passed: a boolean.

a gboolean.

Sets the "is_symlink" attribute in a <GFileInfo> according to is-symlink. See G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

is-symlink

Passed: a boolean.

a gboolean.

Method: file-info:set-modification-date-time self mtime
Method: set-modification-date-time self mtime

Sets the G_FILE_ATTRIBUTE_TIME_MODIFIED and G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info to the given date/time value.

G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC will be cleared.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

mtime

Passed: a <GDateTime>.

a <GDateTime>.

Method: file-info:set-name self name
Method: set-name self name

Sets the name attribute for the current <GFileInfo>. See G_FILE_ATTRIBUTE_STANDARD_NAME.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

name

Passed: a file name, as a string.

a string containing a name.

Method: file-info:set-size self size
Method: set-size self size

Sets the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info to the given size.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

size

Passed: a 64-bit integer.

a goffset containing the file’s size.

Method: file-info:set-sort-order self sort-order
Method: set-sort-order self sort-order

Sets the sort order attribute in the file info structure. See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

sort-order

Passed: a 32-bit integer.

a sort order integer.

Method: file-info:set-symbolic-icon self icon
Method: set-symbolic-icon self icon

Sets the symbolic icon for a given <GFileInfo>. See G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

icon

Passed: a <GIcon>.

a <GIcon>.

Sets the G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info to the given symlink target.

self

Passed: a <GFileInfo>.

a <GFileInfo>.

symlink-target

Passed: a file name, as a string.

a static string containing a path to a symlink target.

Method: file-info:unset-attribute-mask self
Method: unset-attribute-mask self

Unsets a mask set by file-info:set-attribute-mask, if one is set.

self

Passed: a <GFileInfo>.

<GFileInfo>.