W Wrapl, The Programming Language

Libraries:Gtk:Gio:GFileInfo

Types

T

Inherits from:

Functionality for manipulating basic metadata for files. T implements methods for getting information that all files should contain, and allows for manipulation of extended attributes.

See GFileAttribute for more information on how GIO handles file attributes.

To obtain a T for a Gtk.Gio.GFile.T, use Gtk.Gio.GFile.QueryInfo (or its async variant). To obtain a T for a file input or output stream, use Gtk.Gio.GFileInputStream.QueryInfo or Gtk.Gio.GFileOutputStream.QueryInfo (or their async variants).

To change the actual attributes of a file, you should then set the attribute in the T and call Gtk.Gio.GFile.SetAttributesFromInfo or Gtk.Gio.GFile.SetAttributesAsync 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 SetSize. You may call Gtk.Gio.GFile.QuerySettableAttributes and Gtk.Gio.GFile.QueryWritableNamespaces to discover the settable attributes of a particular file at runtime.

Gtk.Gio.GFileAttributeMatcher.T allows for searching through a T for attributes.



Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New() : Gtk.Gio.GFileInfo.T

Creates a new file info structure.

Returns a T.


Methods

:ClearStatus(self @ T) : Std.Object.T

Clears the status information from info.

info a T.


:CopyInto(self @ T, dest_info @ Gtk.Gio.GFileInfo.T) : Std.Object.T

Copies all of the GFileAttributes from src_info to dest_info.

src_info source to copy attributes from.
dest_info destination to copy attributes to.


:Dup(self @ T) : Gtk.Gio.GFileInfo.T

Duplicates a file info structure.

other a T.
Returns a duplicate T of other. [transfer full]


:GetAttributeAsString(self @ T, attribute @ Std.String.T) : Std.String.T

Gets the value of a attribute, formated as a string. This escapes things as needed to make the string valid utf8.

info a T.
attribute a file attribute key.
Returns a UTF-8 string associated with the given attribute. When you're done with the string it must be freed with g_free().


:GetAttributeBoolean(self @ T, attribute @ Std.String.T) : Std.Symbol.T

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

info a T.
attribute a file attribute key.
Returns the boolean value contained within the attribute.


:GetAttributeByteString(self @ T, attribute @ Std.String.T) : Std.String.T

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

info a T.
attribute a file attribute key.
Returns the contents of the attribute value as a byte string, or NULL otherwise.


:GetAttributeData(self @ T, attribute @ Std.String.T, type @ Std.Object.T, value_pp @ Std.Object.T, status @ Std.Object.T) : Std.Symbol.T

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

info a T
attribute a file attribute key
type return location for the attribute type, or NULL. [out][allow-none]
value_pp return location for the attribute value, or NULL. [out][allow-none]
status return location for the attribute status, or NULL. [out][allow-none]
Returns TRUE if info has an attribute named attribute, FALSE otherwise. [transfer none]


:GetAttributeInt32(self @ T, attribute @ Std.String.T) : Std.Integer.SmallT

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.

info a T.
attribute a file attribute key.
Returns a signed 32-bit integer from the attribute.


:GetAttributeInt64(self @ T, attribute @ Std.String.T) : Std.Integer.T

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

info a T.
attribute a file attribute key.
Returns a signed 64-bit integer from the attribute.


:GetAttributeObject(self @ T, attribute @ Std.String.T) : Gtk.GObject.Object.T

Gets the value of a GObject attribute. If the attribute does not contain a GObject, NULL will be returned.

info a T.
attribute a file attribute key.
Returns a GObject associated with the given attribute, or NULL otherwise. [transfer none]


:GetAttributeStatus(self @ T, attribute @ Std.String.T) : Gtk.Gio.GFileAttributeStatus.T

Gets the attribute status for an attribute key.

info a T
attribute a file attribute key
Returns a Gtk.Gio.GFileAttributeStatus.T for the given attribute, or Gtk.Gio.GFileAttributeStatus.Unset if the key is invalid.


:GetAttributeString(self @ T, attribute @ Std.String.T) : Std.String.T

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

info a T.
attribute a file attribute key.
Returns the contents of the attribute value as a UTF-8 string, or NULL otherwise.


:GetAttributeStringv(self @ T, attribute @ Std.String.T) : Std.Object.T

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

info a T.
attribute a file attribute key.
Returns the contents of the attribute value as a stringv, or NULL otherwise. Do not free. These returned strings are UTF-8. [transfer none]


:GetAttributeType(self @ T, attribute @ Std.String.T) : Gtk.Gio.GFileAttributeType.T

Gets the attribute type for an attribute key.

info a T.
attribute a file attribute key.
Returns a Gtk.Gio.GFileAttributeType.T for the given attribute, or Gtk.Gio.GFileAttributeType.Invalid if the key is not set.


:GetAttributeUint32(self @ T, attribute @ Std.String.T) : Std.Integer.SmallT

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.

info a T.
attribute a file attribute key.
Returns an unsigned 32-bit integer from the attribute.


:GetAttributeUint64(self @ T, attribute @ Std.String.T) : Std.Integer.T

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.

info a T.
attribute a file attribute key.
Returns a unsigned 64-bit integer from the attribute.


:GetContentType(self @ T) : Std.String.T

Gets the file's content type.

info a T.
Returns a string containing the file's content type.


:GetDisplayName(self @ T) : Std.String.T

Gets a display name for a file.

info a T.
Returns a string containing the display name.


:GetEditName(self @ T) : Std.String.T

Gets the edit name for a file.

info a T.
Returns a string containing the edit name.


:GetEtag(self @ T) : Std.String.T

Gets the entity tag for a given T. See G_FILE_ATTRIBUTE_ETAG_VALUE.

info a T.
Returns a string containing the value of the "etag:value" attribute.


:GetFileType(self @ T) : Gtk.Gio.GFileType.T

Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's content type, see GetContentType.

info a T.
Returns a Gtk.Gio.GFileType.T for the given file.


:GetIcon(self @ T) : Gtk.Gio.GIcon.T

Gets the icon for a file.

info a T.
Returns Gtk.Gio.GIcon.T for the given info. [transfer none]


:GetIsBackup(self @ T) : Std.Symbol.T

Checks if a file is a backup file.

info a T.
Returns TRUE if file is a backup file, FALSE otherwise.


:GetIsHidden(self @ T) : Std.Symbol.T

Checks if a file is hidden.

info a T.
Returns TRUE if the file is a hidden file, FALSE otherwise.


Checks if a file is a symlink.

info a T.
Returns TRUE if the given info is a symlink.


:GetModificationTime(self @ T, result @ Gtk.Glib.GTimeVal.T) : Std.Object.T

Gets the modification time of the current info and sets it in result.

info a T.
result a Gtk.Glib.GTimeVal.T.


:GetName(self @ T) : Std.String.T

Gets the name for a file.

info a T.
Returns a string containing the file name.


:GetSize(self @ T) : Std.Integer.T

Gets the file's size.

info a T.
Returns a goffset containing the file's size.


:GetSortOrder(self @ T) : Std.Integer.SmallT

Gets the value of the sort_order attribute from the T. See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

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


:GetSymlinkTarget(self @ T) : Std.String.T

Gets the symlink target for a given T.

info a T.
Returns a string containing the symlink target.


:HasAttribute(self @ T, attribute @ Std.String.T) : Std.Symbol.T

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

info a T.
attribute a file attribute key.
Returns TRUE if Ginfo has an attribute named attribute, FALSE otherwise.


:HasNamespace(self @ T, name_space @ Std.String.T) : Std.Symbol.T

Checks if a file info structure has an attribute in the specified name_space.

info a T.
name_space a file attribute namespace.
Returns TRUE if Ginfo has an attribute in name_space, FALSE otherwise.


:ListAttributes(self @ T, name_space @ Std.String.T) : Std.Object.T

Lists the file info structure's attributes.

info a T.
name_space a file attribute key's namespace.
Returns a null-terminated array of strings of all of the possible attribute types for the given name_space, or NULL on error. [array zero-terminated=1][transfer full]


:RemoveAttribute(self @ T, attribute @ Std.String.T) : Std.Object.T

Removes all cases of attribute from info if it exists.

info a T.
attribute a file attribute key.


:SetAttribute(self @ T, attribute @ Std.String.T, type @ Gtk.Gio.GFileAttributeType.T, value_p @ Std.Address.T) : Std.Object.T

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

info a T.
attribute a file attribute key.
type a Gtk.Gio.GFileAttributeType.T
value_p pointer to the value


:SetAttributeBoolean(self @ T, attribute @ Std.String.T, attr_value @ Std.Symbol.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value a boolean value.


:SetAttributeByteString(self @ T, attribute @ Std.String.T, attr_value @ Std.String.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value a byte string.


:SetAttributeInt32(self @ T, attribute @ Std.String.T, attr_value @ Std.Integer.SmallT) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value a signed 32-bit integer


:SetAttributeInt64(self @ T, attribute @ Std.String.T, attr_value @ Std.Integer.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute attribute name to set.
attr_value int64 value to set attribute to.


:SetAttributeMask(self @ T, mask @ Gtk.Gio.GFileAttributeMatcher.T) : Std.Object.T

Sets mask on info to match specific attribute types.



:SetAttributeObject(self @ T, attribute @ Std.String.T, attr_value @ Gtk.GObject.Object.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value a GObject.


:SetAttributeStatus(self @ T, attribute @ Std.String.T, status @ Gtk.Gio.GFileAttributeStatus.T) : Std.Symbol.T

Sets the attribute status for an attribute key. This is only needed by external code that implement Gtk.Gio.GFile.SetAttributesFromInfo or similar functions.

The attribute must exist in info for this to work. Otherwise FALSE is returned and info is unchanged.

info a T
attribute a file attribute key
status a Gtk.Gio.GFileAttributeStatus.T
Returns TRUE if the status was changed, FALSE if the key was not set.


:SetAttributeString(self @ T, attribute @ Std.String.T, attr_value @ Std.String.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value a UTF-8 string.


:SetAttributeStringv(self @ T, attribute @ Std.String.T, attr_value @ Std.Object.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

Sinze: 2.22

info a T.
attribute a file attribute key
attr_value a NULL terminated array of UTF-8 strings.


:SetAttributeUint32(self @ T, attribute @ Std.String.T, attr_value @ Std.Integer.SmallT) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value an unsigned 32-bit integer.


:SetAttributeUint64(self @ T, attribute @ Std.String.T, attr_value @ Std.Integer.T) : Std.Object.T

Sets the attribute to contain the given attr_value, if possible.

info a T.
attribute a file attribute key.
attr_value an unsigned 64-bit integer.


:SetContentType(self @ T, content_type @ Std.String.T) : Std.Object.T

Sets the content type attribute for a given T. See G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

info a T.
content_type a content type. See GContentType.


:SetDisplayName(self @ T, display_name @ Std.String.T) : Std.Object.T

Sets the display name for the current T. See G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

info a T.
display_name a string containing a display name.


:SetEditName(self @ T, edit_name @ Std.String.T) : Std.Object.T

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

info a T.
edit_name a string containing an edit name.


:SetFileType(self @ T, type @ Gtk.Gio.GFileType.T) : Std.Object.T

Sets the file type in a T to type. See G_FILE_ATTRIBUTE_STANDARD_TYPE.

info a T.
type a Gtk.Gio.GFileType.T.


:SetIcon(self @ T, icon @ Gtk.Gio.GIcon.T) : Std.Object.T

Sets the icon for a given T. See G_FILE_ATTRIBUTE_STANDARD_ICON.

info a T.
icon a Gtk.Gio.GIcon.T.


:SetIsHidden(self @ T, is_hidden @ Std.Symbol.T) : Std.Object.T

Sets the "is_hidden" attribute in a T according to is_symlink. See G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

info a T.
is_hidden a gboolean.


Sets the "is_symlink" attribute in a T according to is_symlink. See G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

info a T.
is_symlink a gboolean.


:SetModificationTime(self @ T, mtime @ Gtk.Glib.GTimeVal.T) : Std.Object.T

Sets the G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file info to the given time value.

info a T.
mtime a Gtk.Glib.GTimeVal.T.


:SetName(self @ T, name @ Std.String.T) : Std.Object.T

Sets the name attribute for the current T. See G_FILE_ATTRIBUTE_STANDARD_NAME.

info a T.
name a string containing a name.


:SetSize(self @ T, size @ Std.Integer.T) : Std.Object.T

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

info a T.
size a goffset containing the file's size.


:SetSortOrder(self @ T, sort_order @ Std.Integer.SmallT) : Std.Object.T

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

info a T.
sort_order a sort order integer.


:SetSymlinkTarget(self @ T, symlink_target @ Std.String.T) : Std.Object.T

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

info a T.
symlink_target a static string containing a path to a symlink target.


:UnsetAttributeMask(self @ T) : Std.Object.T

Unsets a mask set by SetAttributeMask, if one is set.

info T.