Class FileInfo

All Implemented Interfaces:
PointerInterface

public class FileInfo extends Object
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 [GFileAttribute][gio-GFileAttribute] for more information on how
GIO handles file attributes.

To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its
async variant). To obtain a #GFileInfo for a file input or output
stream, use g_file_input_stream_query_info() or
g_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 g_file_set_attributes_from_info()
or g_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 g_file_info_set_size().
You may call g_file_query_settable_attributes() and
g_file_query_writable_namespaces() to discover the settable attributes
of a particular file at runtime.

The direct accessors, such as g_file_info_get_name(), are slightly more
optimized than the generic attribute accessors, such as
g_file_info_get_attribute_byte_string().This optimization will matter
only if calling the API in a tight loop.

#GFileAttributeMatcher allows for searching through a #GFileInfo for
attributes.

https://docs.gtk.org/gio/class.FileInfo.html

  • Constructor Details

    • FileInfo

      public FileInfo(PointerContainer pointer)
    • FileInfo

      public FileInfo()
      Creates a new file info structure.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • clearStatus

      public void clearStatus()
      Clears the status information from @info.
    • copyInto

      public void copyInto(@Nonnull FileInfo dest_info)
      First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info,
      and then copies all of the file attributes from @src_info to @dest_info.
      Parameters:
      dest_info - destination to copy attributes to.
    • dup

      public FileInfo dup()
      Duplicates a file info structure.
      Returns:
      a duplicate #GFileInfo of @other.
    • getAccessDateTime

      public DateTime getAccessDateTime()
      Gets the access time of the current @info and returns it as a
      #GDateTime.

      This requires the %G_FILE_ATTRIBUTE_TIME_ACCESS attribute. If
      %G_FILE_ATTRIBUTE_TIME_ACCESS_USEC is provided, the resulting #GDateTime
      will have microsecond precision.

      If nanosecond precision is needed, %G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC must
      be queried separately using g_file_info_get_attribute_uint32().
      Returns:
      access time, or %NULL if unknown
    • getAttributeAsString

      public Str getAttributeAsString(@Nonnull Str attribute)
      Gets the value of a attribute, formatted as a string.
      This escapes things as needed to make the string valid
      UTF-8.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a UTF-8 string associated with the given @attribute, or %NULL if the attribute wasn’t set. When you're done with the string it must be freed with g_free().
    • getAttributeAsString

      public Str getAttributeAsString(String attribute)
      Gets the value of a attribute, formatted as a string.
      This escapes things as needed to make the string valid
      UTF-8.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a UTF-8 string associated with the given @attribute, or %NULL if the attribute wasn’t set. When you're done with the string it must be freed with g_free().
    • getAttributeBoolean

      public boolean getAttributeBoolean(@Nonnull Str attribute)
      Gets the value of a boolean attribute. If the attribute does not
      contain a boolean value, %FALSE will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the boolean value contained within the attribute.
    • getAttributeBoolean

      public boolean getAttributeBoolean(String attribute)
      Gets the value of a boolean attribute. If the attribute does not
      contain a boolean value, %FALSE will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the boolean value contained within the attribute.
    • getAttributeByteString

      public Str getAttributeByteString(@Nonnull Str attribute)
      Gets the value of a byte string attribute. If the attribute does
      not contain a byte string, %NULL will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the @attribute value as a byte string, or %NULL otherwise.
    • getAttributeByteString

      public Str getAttributeByteString(String attribute)
      Gets the value of a byte string attribute. If the attribute does
      not contain a byte string, %NULL will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the @attribute value as a byte string, or %NULL otherwise.
    • getAttributeInt32

      public int getAttributeInt32(@Nonnull Str attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a signed 32-bit integer from the attribute.
    • getAttributeInt32

      public int getAttributeInt32(String attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a signed 32-bit integer from the attribute.
    • getAttributeInt64

      public long getAttributeInt64(@Nonnull Str attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a signed 64-bit integer from the attribute.
    • getAttributeInt64

      public long getAttributeInt64(String attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a signed 64-bit integer from the attribute.
    • getAttributeObject

      public Object getAttributeObject(@Nonnull Str attribute)
      Gets the value of a #GObject attribute. If the attribute does
      not contain a #GObject, %NULL will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a #GObject associated with the given @attribute, or %NULL otherwise.
    • getAttributeObject

      public Object getAttributeObject(String attribute)
      Gets the value of a #GObject attribute. If the attribute does
      not contain a #GObject, %NULL will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a #GObject associated with the given @attribute, or %NULL otherwise.
    • getAttributeStatus

      public int getAttributeStatus(@Nonnull Str attribute)
      Gets the attribute status for an attribute key.
      Parameters:
      attribute - a file attribute key
      Returns:
      a #GFileAttributeStatus for the given @attribute, or %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
    • getAttributeStatus

      public int getAttributeStatus(String attribute)
      Gets the attribute status for an attribute key.
      Parameters:
      attribute - a file attribute key
      Returns:
      a #GFileAttributeStatus for the given @attribute, or %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.
    • getAttributeString

      public Str getAttributeString(@Nonnull Str attribute)
      Gets the value of a string attribute. If the attribute does
      not contain a string, %NULL will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the @attribute value as a UTF-8 string, or %NULL otherwise.
    • getAttributeString

      public Str getAttributeString(String attribute)
      Gets the value of a string attribute. If the attribute does
      not contain a string, %NULL will be returned.
      Parameters:
      attribute - a file attribute key.
      Returns:
      the contents of the @attribute value as a UTF-8 string, or %NULL otherwise.
    • getAttributeStringv

      public Strs getAttributeStringv(@Nonnull Str attribute)
      Gets the value of a stringv attribute. If the attribute does
      not contain a stringv, %NULL will be returned.
      Parameters:
      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.
    • getAttributeStringv

      public Strs getAttributeStringv(String attribute)
      Gets the value of a stringv attribute. If the attribute does
      not contain a stringv, %NULL will be returned.
      Parameters:
      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.
    • getAttributeType

      public int getAttributeType(@Nonnull Str attribute)
      Gets the attribute type for an attribute key.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a #GFileAttributeType for the given @attribute, or %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
    • getAttributeType

      public int getAttributeType(String attribute)
      Gets the attribute type for an attribute key.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a #GFileAttributeType for the given @attribute, or %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.
    • getAttributeUint32

      public int getAttributeUint32(@Nonnull Str attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      an unsigned 32-bit integer from the attribute.
    • getAttributeUint32

      public int getAttributeUint32(String attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      an unsigned 32-bit integer from the attribute.
    • getAttributeUint64

      public long getAttributeUint64(@Nonnull Str attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a unsigned 64-bit integer from the attribute.
    • getAttributeUint64

      public long getAttributeUint64(String attribute)
      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.
      Parameters:
      attribute - a file attribute key.
      Returns:
      a unsigned 64-bit integer from the attribute.
    • getContentType

      public Str getContentType()
      Gets the file's content type.
      Returns:
      a string containing the file's content type, or %NULL if unknown.
    • getCreationDateTime

      public DateTime getCreationDateTime()
      Gets the creation time of the current @info and returns it as a
      #GDateTime.

      This requires the %G_FILE_ATTRIBUTE_TIME_CREATED attribute. If
      %G_FILE_ATTRIBUTE_TIME_CREATED_USEC is provided, the resulting #GDateTime
      will have microsecond precision.

      If nanosecond precision is needed, %G_FILE_ATTRIBUTE_TIME_CREATED_NSEC must
      be queried separately using g_file_info_get_attribute_uint32().
      Returns:
      creation time, or %NULL if unknown
    • getDeletionDate

      public DateTime getDeletionDate()
      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, %NULL is returned.
      Returns:
      a #GDateTime, or %NULL.
    • getDisplayName

      public Str getDisplayName()
      Gets a display name for a file. This is guaranteed to always be set.
      Returns:
      a string containing the display name.
    • getEditName

      public Str getEditName()
      Gets the edit name for a file.
      Returns:
      a string containing the edit name.
    • getEtag

      public Str getEtag()
      Gets the [entity tag][gfile-etag] for a given
      #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
      Returns:
      a string containing the value of the "etag:value" attribute.
    • getFileType

      public int getFileType()
      Gets a file's type (whether it is a regular file, symlink, etc).
      This is different from the file's content type, see g_file_info_get_content_type().
      Returns:
      a #GFileType for the given file.
    • getIcon

      public Icon getIcon()
      Gets the icon for a file.
      Returns:
      #GIcon for the given @info.
    • getIsBackup

      public boolean getIsBackup()
      Checks if a file is a backup file.
      Returns:
      %TRUE if file is a backup file, %FALSE otherwise.
    • getIsHidden

      public boolean getIsHidden()
      Checks if a file is hidden.
      Returns:
      %TRUE if the file is a hidden file, %FALSE otherwise.
    • getIsSymlink

      public boolean getIsSymlink()
      Checks if a file is a symlink.
      Returns:
      %TRUE if the given @info is a symlink.
    • getModificationDateTime

      public DateTime getModificationDateTime()
      Gets the modification time of the current @info and returns it as a
      #GDateTime.

      This requires the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute. If
      %G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting #GDateTime
      will have microsecond precision.

      If nanosecond precision is needed, %G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC must
      be queried separately using g_file_info_get_attribute_uint32().
      Returns:
      modification time, or %NULL if unknown
    • getName

      public Str getName()
      Gets the name for a file. This is guaranteed to always be set.
      Returns:
      a string containing the file name.
    • getSortOrder

      public int getSortOrder()
      Gets the value of the sort_order attribute from the #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
      Returns:
      a #gint32 containing the value of the "standard::sort_order" attribute.
    • getSymbolicIcon

      public Icon getSymbolicIcon()
      Gets the symbolic icon for a file.
      Returns:
      #GIcon for the given @info.
    • getSymlinkTarget

      public Str getSymlinkTarget()
      Gets the symlink target for a given #GFileInfo.
      Returns:
      a string containing the symlink target.
    • hasAttribute

      public boolean hasAttribute(@Nonnull Str attribute)
      Checks if a file info structure has an attribute named @attribute.
      Parameters:
      attribute - a file attribute key.
      Returns:
      %TRUE if @info has an attribute named @attribute, %FALSE otherwise.
    • hasAttribute

      public boolean hasAttribute(String attribute)
      Checks if a file info structure has an attribute named @attribute.
      Parameters:
      attribute - a file attribute key.
      Returns:
      %TRUE if @info has an attribute named @attribute, %FALSE otherwise.
    • hasNamespace

      public boolean hasNamespace(@Nonnull Str name_space)
      Checks if a file info structure has an attribute in the
      specified @name_space.
      Parameters:
      name_space - a file attribute namespace.
      Returns:
      %TRUE if @info has an attribute in @name_space, %FALSE otherwise.
    • hasNamespace

      public boolean hasNamespace(String name_space)
      Checks if a file info structure has an attribute in the
      specified @name_space.
      Parameters:
      name_space - a file attribute namespace.
      Returns:
      %TRUE if @info has an attribute in @name_space, %FALSE otherwise.
    • listAttributes

      public Strs listAttributes(@Nullable Str name_space)
      Lists the file info structure's attributes.
      Parameters:
      name_space - a file attribute key's namespace, or %NULL to list all attributes.
      Returns:
      a null-terminated array of strings of all of the possible attribute types for the given @name_space, or %NULL on error.
    • listAttributes

      public Strs listAttributes(String name_space)
      Lists the file info structure's attributes.
      Parameters:
      name_space - a file attribute key's namespace, or %NULL to list all attributes.
      Returns:
      a null-terminated array of strings of all of the possible attribute types for the given @name_space, or %NULL on error.
    • removeAttribute

      public void removeAttribute(@Nonnull Str attribute)
      Removes all cases of @attribute from @info if it exists.
      Parameters:
      attribute - a file attribute key.
    • removeAttribute

      public void removeAttribute(String attribute)
      Removes all cases of @attribute from @info if it exists.
      Parameters:
      attribute - a file attribute key.
    • setAccessDateTime

      public void setAccessDateTime(@Nonnull DateTime 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.
      Parameters:
      atime - a #GDateTime.
    • setAttribute

      public void setAttribute(@Nonnull Str attribute, int type, @Nonnull Pointer value_p)
      Sets the @attribute to contain the given value, if possible. To unset the
      attribute, use %G_FILE_ATTRIBUTE_TYPE_INVALID for @type.
      Parameters:
      attribute - a file attribute key.
      type - a #GFileAttributeType
      value_p - pointer to the value
    • setAttribute

      public void setAttribute(String attribute, int type, @Nonnull Pointer value_p)
      Sets the @attribute to contain the given value, if possible. To unset the
      attribute, use %G_FILE_ATTRIBUTE_TYPE_INVALID for @type.
      Parameters:
      attribute - a file attribute key.
      type - a #GFileAttributeType
      value_p - pointer to the value
    • setAttributeBoolean

      public void setAttributeBoolean(@Nonnull Str attribute, boolean attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a boolean value.
    • setAttributeBoolean

      public void setAttributeBoolean(String attribute, boolean attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a boolean value.
    • setAttributeByteString

      public void setAttributeByteString(@Nonnull Str attribute, @Nonnull Str attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a byte string.
    • setAttributeByteString

      public void setAttributeByteString(String attribute, String attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a byte string.
    • setAttributeInt32

      public void setAttributeInt32(@Nonnull Str attribute, int attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a signed 32-bit integer
    • setAttributeInt32

      public void setAttributeInt32(String attribute, int attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a signed 32-bit integer
    • setAttributeInt64

      public void setAttributeInt64(@Nonnull Str attribute, long attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - attribute name to set.
      attr_value - int64 value to set attribute to.
    • setAttributeInt64

      public void setAttributeInt64(String attribute, long attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - attribute name to set.
      attr_value - int64 value to set attribute to.
    • setAttributeMask

      public void setAttributeMask(@Nonnull FileAttributeMatcher mask)
      Sets @mask on @info to match specific attribute types.
      Parameters:
      mask - a #GFileAttributeMatcher.
    • setAttributeObject

      public void setAttributeObject(@Nonnull Str attribute, @Nonnull Object attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a #GObject.
    • setAttributeObject

      public void setAttributeObject(String attribute, @Nonnull Object attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a #GObject.
    • setAttributeStatus

      public boolean setAttributeStatus(@Nonnull Str attribute, int status)
      Sets the attribute status for an attribute key. This is only
      needed by external code that implement g_file_set_attributes_from_info()
      or similar functions.

      The attribute must exist in @info for this to work. Otherwise %FALSE
      is returned and @info is unchanged.
      Parameters:
      attribute - a file attribute key
      status - a #GFileAttributeStatus
      Returns:
      %TRUE if the status was changed, %FALSE if the key was not set.
    • setAttributeStatus

      public boolean setAttributeStatus(String attribute, int status)
      Sets the attribute status for an attribute key. This is only
      needed by external code that implement g_file_set_attributes_from_info()
      or similar functions.

      The attribute must exist in @info for this to work. Otherwise %FALSE
      is returned and @info is unchanged.
      Parameters:
      attribute - a file attribute key
      status - a #GFileAttributeStatus
      Returns:
      %TRUE if the status was changed, %FALSE if the key was not set.
    • setAttributeString

      public void setAttributeString(@Nonnull Str attribute, @Nonnull Str attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a UTF-8 string.
    • setAttributeString

      public void setAttributeString(String attribute, String attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - a UTF-8 string.
    • setAttributeStringv

      public void setAttributeStringv(@Nonnull Str attribute, @Nonnull Strs attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.

      Sinze: 2.22
      Parameters:
      attribute - a file attribute key
      attr_value - a %NULL terminated array of UTF-8 strings.
    • setAttributeStringv

      public void setAttributeStringv(String attribute, @Nonnull Strs attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.

      Sinze: 2.22
      Parameters:
      attribute - a file attribute key
      attr_value - a %NULL terminated array of UTF-8 strings.
    • setAttributeUint32

      public void setAttributeUint32(@Nonnull Str attribute, int attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - an unsigned 32-bit integer.
    • setAttributeUint32

      public void setAttributeUint32(String attribute, int attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - an unsigned 32-bit integer.
    • setAttributeUint64

      public void setAttributeUint64(@Nonnull Str attribute, long attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - an unsigned 64-bit integer.
    • setAttributeUint64

      public void setAttributeUint64(String attribute, long attr_value)
      Sets the @attribute to contain the given @attr_value,
      if possible.
      Parameters:
      attribute - a file attribute key.
      attr_value - an unsigned 64-bit integer.
    • setContentType

      public void setContentType(@Nonnull Str content_type)
      Sets the content type attribute for a given #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
      Parameters:
      content_type - a content type. See [GContentType][gio-GContentType]
    • setContentType

      public void setContentType(String content_type)
      Sets the content type attribute for a given #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
      Parameters:
      content_type - a content type. See [GContentType][gio-GContentType]
    • setCreationDateTime

      public void setCreationDateTime(@Nonnull DateTime 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.
      Parameters:
      creation_time - a #GDateTime.
    • setDisplayName

      public void setDisplayName(@Nonnull Str display_name)
      Sets the display name for the current #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
      Parameters:
      display_name - a string containing a display name.
    • setDisplayName

      public void setDisplayName(String display_name)
      Sets the display name for the current #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
      Parameters:
      display_name - a string containing a display name.
    • setEditName

      public void setEditName(@Nonnull Str edit_name)
      Sets the edit name for the current file.
      See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
      Parameters:
      edit_name - a string containing an edit name.
    • setEditName

      public void setEditName(String edit_name)
      Sets the edit name for the current file.
      See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
      Parameters:
      edit_name - a string containing an edit name.
    • setFileType

      public void setFileType(int type)
      Sets the file type in a #GFileInfo to @type.
      See %G_FILE_ATTRIBUTE_STANDARD_TYPE.
      Parameters:
      type - a #GFileType.
    • setIcon

      public void setIcon(@Nonnull Icon icon)
      Sets the icon for a given #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_ICON.
      Parameters:
      icon - a #GIcon.
    • setIsHidden

      public void setIsHidden(boolean is_hidden)
      Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden.
      See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.
      Parameters:
      is_hidden - a #gboolean.
    • setIsSymlink

      public void setIsSymlink(boolean is_symlink)
      Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink.
      See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.
      Parameters:
      is_symlink - a #gboolean.
    • setModificationDateTime

      public void setModificationDateTime(@Nonnull DateTime 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.
      Parameters:
      mtime - a #GDateTime.
    • setName

      public void setName(@Nonnull Str name)
      Sets the name attribute for the current #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_NAME.
      Parameters:
      name - a string containing a name.
    • setName

      public void setName(String name)
      Sets the name attribute for the current #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_NAME.
      Parameters:
      name - a string containing a name.
    • setSortOrder

      public void setSortOrder(int sort_order)
      Sets the sort order attribute in the file info structure. See
      %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
      Parameters:
      sort_order - a sort order integer.
    • setSymbolicIcon

      public void setSymbolicIcon(@Nonnull Icon icon)
      Sets the symbolic icon for a given #GFileInfo.
      See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.
      Parameters:
      icon - a #GIcon.
    • setSymlinkTarget

      public void setSymlinkTarget(@Nonnull Str symlink_target)
      Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
      to the given symlink target.
      Parameters:
      symlink_target - a static string containing a path to a symlink target.
    • setSymlinkTarget

      public void setSymlinkTarget(String symlink_target)
      Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info
      to the given symlink target.
      Parameters:
      symlink_target - a static string containing a path to a symlink target.
    • unsetAttributeMask

      public void unsetAttributeMask()
      Unsets a mask set by g_file_info_set_attribute_mask(), if one
      is set.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()