## GFileInfo

GFileInfo — File Information and Attributes

## Synopsis

    #include <gio/gio.h>

                        GFileAttributeMatcher;
    enum                GFileType;
                        GFileInfo;
    #define             G_FILE_ATTRIBUTE_STANDARD_TYPE
    #define             G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN
    #define             G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP
    #define             G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK
    #define             G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL
    #define             G_FILE_ATTRIBUTE_STANDARD_NAME
    #define             G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
    #define             G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME
    #define             G_FILE_ATTRIBUTE_STANDARD_COPY_NAME
    #define             G_FILE_ATTRIBUTE_STANDARD_ICON
    #define             G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE
    #define             G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE
    #define             G_FILE_ATTRIBUTE_STANDARD_SIZE
    #define             G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET
    #define             G_FILE_ATTRIBUTE_STANDARD_TARGET_URI
    #define             G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER
    #define             G_FILE_ATTRIBUTE_ETAG_VALUE
    #define             G_FILE_ATTRIBUTE_ID_FILE
    #define             G_FILE_ATTRIBUTE_ID_FILESYSTEM
    #define             G_FILE_ATTRIBUTE_ACCESS_CAN_READ
    #define             G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE
    #define             G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE
    #define             G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE
    #define             G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH
    #define             G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME
    #define             G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT
    #define             G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT
    #define             G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT
    #define             G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE
    #define             G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI
    #define             G_FILE_ATTRIBUTE_TIME_MODIFIED
    #define             G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC
    #define             G_FILE_ATTRIBUTE_TIME_ACCESS
    #define             G_FILE_ATTRIBUTE_TIME_ACCESS_USEC
    #define             G_FILE_ATTRIBUTE_TIME_CHANGED
    #define             G_FILE_ATTRIBUTE_TIME_CHANGED_USEC
    #define             G_FILE_ATTRIBUTE_TIME_CREATED
    #define             G_FILE_ATTRIBUTE_TIME_CREATED_USEC
    #define             G_FILE_ATTRIBUTE_UNIX_DEVICE
    #define             G_FILE_ATTRIBUTE_UNIX_INODE
    #define             G_FILE_ATTRIBUTE_UNIX_MODE
    #define             G_FILE_ATTRIBUTE_UNIX_NLINK
    #define             G_FILE_ATTRIBUTE_UNIX_UID
    #define             G_FILE_ATTRIBUTE_UNIX_GID
    #define             G_FILE_ATTRIBUTE_UNIX_RDEV
    #define             G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE
    #define             G_FILE_ATTRIBUTE_UNIX_BLOCKS
    #define             G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT
    #define             G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE
    #define             G_FILE_ATTRIBUTE_DOS_IS_SYSTEM
    #define             G_FILE_ATTRIBUTE_OWNER_USER
    #define             G_FILE_ATTRIBUTE_OWNER_USER_REAL
    #define             G_FILE_ATTRIBUTE_OWNER_GROUP
    #define             G_FILE_ATTRIBUTE_THUMBNAIL_PATH
    #define             G_FILE_ATTRIBUTE_THUMBNAILING_FAILED
    #define             G_FILE_ATTRIBUTE_FILESYSTEM_SIZE
    #define             G_FILE_ATTRIBUTE_FILESYSTEM_FREE
    #define             G_FILE_ATTRIBUTE_FILESYSTEM_TYPE
    #define             G_FILE_ATTRIBUTE_FILESYSTEM_READONLY
    #define             G_FILE_ATTRIBUTE_GVFS_BACKEND
    #define             G_FILE_ATTRIBUTE_SELINUX_CONTEXT
    #define             G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
    #define             G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW
    #define             G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION
    GFileInfo *         g_file_info_new                     (void);
    GFileInfo *         g_file_info_dup                     (GFileInfo *other);
    void                g_file_info_copy_into               (GFileInfo *src_info,
                                                             GFileInfo *dest_info);
    gboolean            g_file_info_has_attribute           (GFileInfo *info,
                                                             const char *attribute);
    char **             g_file_info_list_attributes         (GFileInfo *info,
                                                             const char *name_space);
    GFileAttributeType  g_file_info_get_attribute_type      (GFileInfo *info,
                                                             const char *attribute);
    void                g_file_info_remove_attribute        (GFileInfo *info,
                                                             const char *attribute);
    char *              g_file_info_get_attribute_as_string (GFileInfo *info,
                                                             const char *attribute);
    gboolean            g_file_info_get_attribute_data      (GFileInfo *info,
                                                             const char *attribute,
                                                             GFileAttributeType *type,
                                                             gpointer *value_pp,
                                                             GFileAttributeStatus *status);
    GFileAttributeStatus  g_file_info_get_attribute_status  (GFileInfo *info,
                                                             const char *attribute);
    const char *        g_file_info_get_attribute_string    (GFileInfo *info,
                                                             const char *attribute);
    const char *        g_file_info_get_attribute_byte_string
                                                            (GFileInfo *info,
                                                             const char *attribute);
    gboolean            g_file_info_get_attribute_boolean   (GFileInfo *info,
                                                             const char *attribute);
    guint32             g_file_info_get_attribute_uint32    (GFileInfo *info,
                                                             const char *attribute);
    gint32              g_file_info_get_attribute_int32     (GFileInfo *info,
                                                             const char *attribute);
    guint64             g_file_info_get_attribute_uint64    (GFileInfo *info,
                                                             const char *attribute);
    gint64              g_file_info_get_attribute_int64     (GFileInfo *info,
                                                             const char *attribute);
    GObject *           g_file_info_get_attribute_object    (GFileInfo *info,
                                                             const char *attribute);
    void                g_file_info_set_attribute           (GFileInfo *info,
                                                             const char *attribute,
                                                             GFileAttributeType type,
                                                             gpointer value_p);
    void                g_file_info_set_attribute_string    (GFileInfo *info,
                                                             const char *attribute,
                                                             const char *attr_value);
    void                g_file_info_set_attribute_byte_string
                                                            (GFileInfo *info,
                                                             const char *attribute,
                                                             const char *attr_value);
    void                g_file_info_set_attribute_boolean   (GFileInfo *info,
                                                             const char *attribute,
                                                             gboolean attr_value);
    void                g_file_info_set_attribute_uint32    (GFileInfo *info,
                                                             const char *attribute,
                                                             guint32 attr_value);
    void                g_file_info_set_attribute_int32     (GFileInfo *info,
                                                             const char *attribute,
                                                             gint32 attr_value);
    void                g_file_info_set_attribute_uint64    (GFileInfo *info,
                                                             const char *attribute,
                                                             guint64 attr_value);
    void                g_file_info_set_attribute_int64     (GFileInfo *info,
                                                             const char *attribute,
                                                             gint64 attr_value);
    void                g_file_info_set_attribute_object    (GFileInfo *info,
                                                             const char *attribute,
                                                             GObject *attr_value);
    void                g_file_info_clear_status            (GFileInfo *info);
    GFileType           g_file_info_get_file_type           (GFileInfo *info);
    gboolean            g_file_info_get_is_hidden           (GFileInfo *info);
    gboolean            g_file_info_get_is_backup           (GFileInfo *info);
    gboolean            g_file_info_get_is_symlink          (GFileInfo *info);
    const char *        g_file_info_get_name                (GFileInfo *info);
    const char *        g_file_info_get_display_name        (GFileInfo *info);
    const char *        g_file_info_get_edit_name           (GFileInfo *info);
    GIcon *             g_file_info_get_icon                (GFileInfo *info);
    const char *        g_file_info_get_content_type        (GFileInfo *info);
    goffset             g_file_info_get_size                (GFileInfo *info);
    void                g_file_info_get_modification_time   (GFileInfo *info,
                                                             GTimeVal *result);
    const char *        g_file_info_get_symlink_target      (GFileInfo *info);
    const char *        g_file_info_get_etag                (GFileInfo *info);
    gint32              g_file_info_get_sort_order          (GFileInfo *info);
    void                g_file_info_set_attribute_mask      (GFileInfo *info,
                                                             GFileAttributeMatcher *mask);
    void                g_file_info_unset_attribute_mask    (GFileInfo *info);
    void                g_file_info_set_file_type           (GFileInfo *info,
                                                             GFileType type);
    void                g_file_info_set_is_hidden           (GFileInfo *info,
                                                             gboolean is_hidden);
    void                g_file_info_set_is_symlink          (GFileInfo *info,
                                                             gboolean is_symlink);
    void                g_file_info_set_name                (GFileInfo *info,
                                                             const char *name);
    void                g_file_info_set_display_name        (GFileInfo *info,
                                                             const char *display_name);
    void                g_file_info_set_edit_name           (GFileInfo *info,
                                                             const char *edit_name);
    void                g_file_info_set_icon                (GFileInfo *info,
                                                             GIcon *icon);
    void                g_file_info_set_content_type        (GFileInfo *info,
                                                             const char *content_type);
    void                g_file_info_set_size                (GFileInfo *info,
                                                             goffset size);
    void                g_file_info_set_modification_time   (GFileInfo *info,
                                                             GTimeVal *mtime);
    void                g_file_info_set_symlink_target      (GFileInfo *info,
                                                             const char *symlink_target);
    void                g_file_info_set_sort_order          (GFileInfo *info,
                                                             gint32 sort_order);
    GFileAttributeMatcher * g_file_attribute_matcher_new    (const char *attributes);
    GFileAttributeMatcher * g_file_attribute_matcher_ref    (GFileAttributeMatcher *matcher);
    void                g_file_attribute_matcher_unref      (GFileAttributeMatcher *matcher);
    gboolean            g_file_attribute_matcher_matches    (GFileAttributeMatcher *matcher,
                                                             const char *attribute);
    gboolean            g_file_attribute_matcher_matches_only
                                                            (GFileAttributeMatcher *matcher,
                                                             const char *attribute);
    gboolean            g_file_attribute_matcher_enumerate_namespace
                                                            (GFileAttributeMatcher *matcher,
                                                             const char *ns);
    const char *        g_file_attribute_matcher_enumerate_next
                                                            (GFileAttributeMatcher *matcher);

## Object Hierarchy

      GObject
       +----GFileInfo

## Description

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

GFileAttributeMatcher allows for searching through a GFileInfo for attributes.

## Details

### GFileAttributeMatcher

    typedef struct _GFileAttributeMatcher GFileAttributeMatcher;

Determines if a string matches a file attribute.

### enum GFileType

    typedef enum {
      G_FILE_TYPE_UNKNOWN = 0,
      G_FILE_TYPE_REGULAR,
      G_FILE_TYPE_DIRECTORY,
      G_FILE_TYPE_SYMBOLIC_LINK,
      G_FILE_TYPE_SPECIAL, /* socket, fifo, blockdev, chardev */
      G_FILE_TYPE_SHORTCUT,
      G_FILE_TYPE_MOUNTABLE
    } GFileType;

Indicates the file's on-disk type.

`G_FILE_TYPE_UNKNOWN` | File's type is unknown.
`G_FILE_TYPE_REGULAR` | File handle represents a regular file.
`G_FILE_TYPE_DIRECTORY` | File handle represents a directory.
`G_FILE_TYPE_SYMBOLIC_LINK` | File handle represents a symbolic link (Unix systems).
`G_FILE_TYPE_SPECIAL` | File is a "special" file, such as a socket, fifo, block device, or character device.
`G_FILE_TYPE_SHORTCUT` | File is a shortcut (Windows systems).
`G_FILE_TYPE_MOUNTABLE` | File is a mountable location.

### GFileInfo

    typedef struct _GFileInfo GFileInfo;

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

### G_FILE_ATTRIBUTE_STANDARD_TYPE

    #define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type"                     /* uint32 (GFileType) */

A key in the "standard" namespace for storing file types. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`. The value for this key should contain a GFileType.

### G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN

    #define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden"           /* boolean */

A key in the "standard" namespace for checking if a file is hidden. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP

    #define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup"           /* boolean */

A key in the "standard" namespace for checking if a file is a backup file. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK

    #define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink"         /* boolean */

A key in the "standard" namespace for checking if the file is a symlink. Typically the actual type is something else, if we followed the symlink to get the type. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL

    #define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual"         /* boolean */

A key in the "standard" namespace for checking if a file is virtual. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_STANDARD_NAME

    #define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name"                     /* byte string */

A key in the "standard" namespace for getting the name of the file. The name is the on-disk filename which may not be in any known encoding, and can thus not be generally displayed as is. Use G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user interface. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BYTE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME

    #define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name"     /* string */

A key in the "standard" namespace for getting the display name of the file. A display name is guaranteed to be in UTF8 and can thus be displayed in the UI. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME

    #define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name"           /* string */

A key in the "standard" namespace for edit name of the file. An edit name is similar to the display name, but it is meant to be used when you want to rename the file in the UI. The display name might contain information you don't want in the new filename (such as "(invalid unicode)" if the filename was in an invalid encoding).

Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_COPY_NAME

    #define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name"           /* string */

A key in the "standard" namespace for getting the copy name of the file. The copy name is an optional version of the name. If availible its always in UTF8, and corresponds directly to the original filename (only transcoded to UTF8). This is useful if you want to copy the file to another filesystem that might have a different encoding. If the filename is not a valid string in the encoding selected for the filesystem it is in then the copy name will not be set.

Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_ICON

    #define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon"                     /* object (GIcon) */

A key in the "standard" namespace for getting the icon for the file. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_OBJECT`. The value for this key should contain a GIcon.

### G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE

    #define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"     /* string */

A key in the "standard" namespace for getting the content type of the file. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`. The value for this key should contain a valid content type.

### G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE

    #define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */

A key in the "standard" namespace for getting the fast content type. The fast content type isn't as reliable as the regular one, as it only uses the filename to guess it, but it is faster to calculate than the regular content type. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_SIZE

    #define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size"                     /* uint64 */

A key in the "standard" namespace for getting the file's size (in bytes). Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`.

### G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET

    #define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */

A key in the "standard" namespace for getting the symlink target, if the file is a symlink. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BYTE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_TARGET_URI

    #define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri"         /* string */

A key in the "standard" namespace for getting the target URI for the file, in the case of `G_FILE_TYPE_SHORTCUT` or `G_FILE_TYPE_MOUNTABLE` files. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER

    #define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order"         /* int32  */

A key in the "standard" namespace for setting the sort order of a file. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_INT32`. An example use would be in file managers, which would use this key to set the order files are displayed. Files with smaller sort order should be sorted first, and files without sort order as if sort order was zero.

### G_FILE_ATTRIBUTE_ETAG_VALUE

    #define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value"                 /* string */

A key in the "etag" namespace for getting the value of the file's entity tag. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_ID_FILE

    #define G_FILE_ATTRIBUTE_ID_FILE "id::file"                     /* string */

A key in the "id" namespace for getting a file identifier. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`. An example use would be during listing files, to avoid recursive directory scanning.

### G_FILE_ATTRIBUTE_ID_FILESYSTEM

    #define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem"         /* string */

A key in the "id" namespace for getting the file system identifier. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`. An example use would be during drag and drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).

### G_FILE_ATTRIBUTE_ACCESS_CAN_READ

    #define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read"       /* boolean */

A key in the "access" namespace for getting read privileges. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`. This attribute will be `TRUE` if the user is able to read the file.

### G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE

    #define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write"     /* boolean */

A key in the "access" namespace for getting write privileges. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`. This attribute will be `TRUE` if the user is able to write to the file.

### G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE

    #define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */

A key in the "access" namespace for getting execution privileges. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`. This attribute will be `TRUE` if the user is able to execute the file.

### G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE

    #define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete"   /* boolean */

A key in the "access" namespace for checking deletion privileges. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`. This attribute will be `TRUE` if the user is able to delete the file.

### G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH

    #define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash"     /* boolean */

A key in the "access" namespace for checking trashing privileges. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`. This attribute will be `TRUE` if the user is able to move the file to the trash.

### G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME

    #define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename"   /* boolean */

A key in the "access" namespace for checking renaming privileges. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`. This attribute will be `TRUE` if the user is able to rename the file.

### G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT

    #define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount"     /* boolean */

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT

    #define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT

    #define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject"     /* boolean */

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE

    #define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */

A key in the "mountable" namespace for getting the unix device. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI

    #define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi"         /* string */

A key in the "mountable" namespace for getting the HAL UDI for the mountable file. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_TIME_MODIFIED

    #define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified"           /* uint64 */

A key in the "time" namespace for getting the time the file was last modified. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`, and contains the UNIX time since the file was modified.

### G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC

    #define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */

A key in the "time" namespace for getting the miliseconds of the time the file was last modified. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_TIME_ACCESS

    #define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access"               /* uint64 */

A key in the "time" namespace for getting the time the file was last accessed. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`, and contains the UNIX time since the file was last accessed.

### G_FILE_ATTRIBUTE_TIME_ACCESS_USEC

    #define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec"     /* uint32 */

A key in the "time" namespace for getting the microseconds of the time the file was last accessed. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_TIME_CHANGED

    #define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed"             /* uint64 */

A key in the "time" namespace for getting the time the file was last changed. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`, and contains the UNIX time since the file was last changed.

This corresponds to the traditional UNIX ctime.

### G_FILE_ATTRIBUTE_TIME_CHANGED_USEC

    #define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec"   /* uint32 */

A key in the "time" namespace for getting the microseconds of the time the file was last changed. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_TIME_CREATED

    #define G_FILE_ATTRIBUTE_TIME_CREATED "time::created"             /* uint64 */

A key in the "time" namespace for getting the time the file was created. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`, and contains the UNIX time since the file was created.

This corresponds to the NTFS ctime.

### G_FILE_ATTRIBUTE_TIME_CREATED_USEC

    #define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec"   /* uint32 */

A key in the "time" namespace for getting the microseconds of the time the file was created. This should be used in conjunction with G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_DEVICE

    #define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device"               /* uint32 */

A key in the "unix" namespace for getting the device id of the device the file is located on (see `stat()` documentation). This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_INODE

    #define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode"                 /* uint64 */

A key in the "unix" namespace for getting the inode of the file. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`.

### G_FILE_ATTRIBUTE_UNIX_MODE

    #define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode"                   /* uint32 */

A key in the "unix" namespace for getting the mode of the file (e.g. whether the file is a regular file, symlink, etc). See `lstat()` documentation. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_NLINK

    #define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink"                 /* uint32 */

A key in the "unix" namespace for getting the number of hard links for a file. See `lstat()` documentation. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_UID

    #define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid"                     /* uint32 */

A key in the "unix" namespace for getting the user ID for the file. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_GID

    #define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid"                     /* uint32 */

A key in the "unix" namespace for getting the group ID for the file. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_RDEV

    #define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev"                   /* uint32 */

A key in the "unix" namespace for getting the device ID for the file (if it is a special file). See `lstat()` documentation. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE

    #define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size"       /* uint32 */

A key in the "unix" namespace for getting the block size for the file system. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_UNIX_BLOCKS

    #define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks"               /* uint64 */

A key in the "unix" namespace for getting the number of blocks allocated for the file. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`.

### G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT

    #define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */

A key in the "unix" namespace for checking if the file represents a UNIX mount point. This attribute is `TRUE` if the file is a UNIX mount point. This attribute is only available for UNIX file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE

    #define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive"         /* boolean */

A key in the "dos" namespace for checking if the file's archive flag is set. This attribute is `TRUE` if the archive flag is set. This attribute is only available for DOS file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_DOS_IS_SYSTEM

    #define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system"           /* boolean */

A key in the "dos" namespace for checking if the file's backup flag is set. This attribute is `TRUE` if the backup flag is set. This attribute is only available for DOS file systems. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_OWNER_USER

    #define G_FILE_ATTRIBUTE_OWNER_USER "owner::user"                 /* string */

A key in the "owner" namespace for getting the user name of the file's owner. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_OWNER_USER_REAL

    #define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real"       /* string */

A key in the "owner" namespace for getting the real name of the user that owns the file. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_OWNER_GROUP

    #define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group"               /* string */

A key in the "owner" namespace for getting the file owner's group. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_THUMBNAIL_PATH

    #define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path"         /* bytestring */

A key in the "thumbnail" namespace for getting the path to the thumbnail image. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BYTE_STRING`.

### G_FILE_ATTRIBUTE_THUMBNAILING_FAILED

    #define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed"         /* boolean */

A key in the "thumbnail" namespace for checking if thumbnailing failed. This attribute is `TRUE` if thumbnailing failed. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_FILESYSTEM_SIZE

    #define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size"                       /* uint64 */

A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, used in `g_file_query_filesystem_info()`. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`.

### G_FILE_ATTRIBUTE_FILESYSTEM_FREE

    #define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free"                       /* uint64 */

A key in the "filesystem" namespace for getting the number of bytes of free space left on the file system. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT64`.

### G_FILE_ATTRIBUTE_FILESYSTEM_TYPE

    #define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type"                       /* string */

A key in the "filesystem" namespace for getting the file system's type. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_FILESYSTEM_READONLY

    #define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly"               /* boolean */

A key in the "filesystem" namespace for checking if the file system is read only. Is set to `TRUE` if the file system is read only. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_BOOLEAN`.

### G_FILE_ATTRIBUTE_GVFS_BACKEND

    #define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend"             /* string */

A key in the "gvfs" namespace that gets the name of the current GVFS backend in use. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### G_FILE_ATTRIBUTE_SELINUX_CONTEXT

    #define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context"       /* string */

A key in the "selinux" namespace for getting the file's SELinux context. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`. Note that this attribute is only available if GLib has been built with SELinux support.

### G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT

    #define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count"     /* uint32 */

A key in the "trash" namespace. When requested against "trash:///" returns the number of (toplevel) items in the trash folder. Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_UINT32`.

### G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW

    #define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview"        /* uint32 (GFilesystemPreviewType) */

A key in the "filesystem" namespace for hinting a file manager application whether it should preview (e.g. thumbnail) files on the file system. The value for this key contain a GFilesystemPreviewType.

### G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION

    #define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description"        /* string */

A key in the "standard" namespace for getting the description of the file. The description is a utf8 string that describes the file, generally containing the filename, but can also contain furter information. Example descriptions could be "filename (on hostname)" for a remote file or "filename (in trash)" for a file in the trash. This is useful for instance as the window title when displaying a directory or for a bookmarks menu.

Corresponding GFileAttributeType is `G_FILE_ATTRIBUTE_TYPE_STRING`.

### g_file_info_new ()

    GFileInfo *         g_file_info_new                     (void);

Creates a new file info structure.

Returns : | a GFileInfo.

### g_file_info_dup ()

    GFileInfo *         g_file_info_dup                     (GFileInfo *other);

Duplicates a file info structure.

`other` : | a GFileInfo.
Returns : | a duplicate GFileInfo of `other`.

### g_file_info_copy_into ()

    void                g_file_info_copy_into               (GFileInfo *src_info,
                                                             GFileInfo *dest_info);

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.

### g_file_info_has_attribute ()

    gboolean            g_file_info_has_attribute           (GFileInfo *info,
                                                             const char *attribute);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | `TRUE` if `Ginfo` has an attribute named `attribute`, `FALSE` otherwise.

### g_file_info_list_attributes ()

    char **             g_file_info_list_attributes         (GFileInfo *info,
                                                             const char *name_space);

Lists the file info structure's attributes.

`info` : | a GFileInfo.
`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.

### g_file_info_get_attribute_type ()

    GFileAttributeType  g_file_info_get_attribute_type      (GFileInfo *info,
                                                             const char *attribute);

Gets the attribute type for an attribute key.

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | a GFileAttributeType for the given `attribute`, or `G_FILE_ATTRIBUTE_TYPE_INVALID` if the key is invalid.

### g_file_info_remove_attribute ()

    void                g_file_info_remove_attribute        (GFileInfo *info,
                                                             const char *attribute);

Removes all cases of `attribute` from `info` if it exists.

`info` : | a GFileInfo.
`attribute` : | a file attribute key.

### g_file_info_get_attribute_as_string ()

    char *              g_file_info_get_attribute_as_string (GFileInfo *info,
                                                             const char *attribute);

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

`info` : | a GFileInfo.
`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()`.

### g_file_info_get_attribute_data ()

    gboolean            g_file_info_get_attribute_data      (GFileInfo *info,
                                                             const char *attribute,
                                                             GFileAttributeType *type,
                                                             gpointer *value_pp,
                                                             GFileAttributeStatus *status);

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

`info` : | a GFileInfo
`attribute` : | a file attribute key
`type` : | return location for the attribute type, or `NULL`
`value_pp` : | return location for the attribute value, or `NULL`
`status` : | return location for the attribute status, or `NULL`
Returns : | `TRUE` if `info` has an attribute named `attribute`, `FALSE` otherwise.

### g_file_info_get_attribute_status ()

    GFileAttributeStatus  g_file_info_get_attribute_status  (GFileInfo *info,
                                                             const char *attribute);

Gets the attribute status for an attribute key.

`info` : | a GFileInfo
`attribute` : | a file attribute key
Returns : | a GFileAttributeStatus for the given `attribute`, or `G_FILE_ATTRIBUTE_STATUS_UNSET` if the key is invalid.

### g_file_info_get_attribute_string ()

    const char *        g_file_info_get_attribute_string    (GFileInfo *info,
                                                             const char *attribute);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | the contents of the `attribute` value as a string, or `NULL` otherwise.

### g_file_info_get_attribute_byte_string ()

    const char *        g_file_info_get_attribute_byte_string
                                                            (GFileInfo *info,
                                                             const char *attribute);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | the contents of the `attribute` value as a byte string, or `NULL` otherwise.

### g_file_info_get_attribute_boolean ()

    gboolean            g_file_info_get_attribute_boolean   (GFileInfo *info,
                                                             const char *attribute);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | the boolean value contained within the attribute.

### g_file_info_get_attribute_uint32 ()

    guint32             g_file_info_get_attribute_uint32    (GFileInfo *info,
                                                             const char *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.

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | an unsigned 32-bit integer from the attribute.

### g_file_info_get_attribute_int32 ()

    gint32              g_file_info_get_attribute_int32     (GFileInfo *info,
                                                             const char *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.

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | a signed 32-bit integer from the attribute.

### g_file_info_get_attribute_uint64 ()

    guint64             g_file_info_get_attribute_uint64    (GFileInfo *info,
                                                             const char *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.

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | a unsigned 64-bit integer from the attribute.

### g_file_info_get_attribute_int64 ()

    gint64              g_file_info_get_attribute_int64     (GFileInfo *info,
                                                             const char *attribute);

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 GFileInfo.
`attribute` : | a file attribute key.
Returns : | a signed 64-bit integer from the attribute.

### g_file_info_get_attribute_object ()

    GObject *           g_file_info_get_attribute_object    (GFileInfo *info,
                                                             const char *attribute);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
Returns : | a GObject associated with the given `attribute`, or `NULL` otherwise.

### g_file_info_set_attribute ()

    void                g_file_info_set_attribute           (GFileInfo *info,
                                                             const char *attribute,
                                                             GFileAttributeType type,
                                                             gpointer value_p);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`type` : | a GFileAttributeType
`value_p` : | pointer to the value

### g_file_info_set_attribute_string ()

    void                g_file_info_set_attribute_string    (GFileInfo *info,
                                                             const char *attribute,
                                                             const char *attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | a string.

### g_file_info_set_attribute_byte_string ()

    void                g_file_info_set_attribute_byte_string
                                                            (GFileInfo *info,
                                                             const char *attribute,
                                                             const char *attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | a byte string.

### g_file_info_set_attribute_boolean ()

    void                g_file_info_set_attribute_boolean   (GFileInfo *info,
                                                             const char *attribute,
                                                             gboolean attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | a boolean value.

### g_file_info_set_attribute_uint32 ()

    void                g_file_info_set_attribute_uint32    (GFileInfo *info,
                                                             const char *attribute,
                                                             guint32 attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | an unsigned 32-bit integer.

### g_file_info_set_attribute_int32 ()

    void                g_file_info_set_attribute_int32     (GFileInfo *info,
                                                             const char *attribute,
                                                             gint32 attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | a signed 32-bit integer

### g_file_info_set_attribute_uint64 ()

    void                g_file_info_set_attribute_uint64    (GFileInfo *info,
                                                             const char *attribute,
                                                             guint64 attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | an unsigned 64-bit integer.

### g_file_info_set_attribute_int64 ()

    void                g_file_info_set_attribute_int64     (GFileInfo *info,
                                                             const char *attribute,
                                                             gint64 attr_value);

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

`info` : | a GFileInfo.
`attribute` : | attribute name to set.
`attr_value` : | int64 value to set attribute to.

### g_file_info_set_attribute_object ()

    void                g_file_info_set_attribute_object    (GFileInfo *info,
                                                             const char *attribute,
                                                             GObject *attr_value);

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

`info` : | a GFileInfo.
`attribute` : | a file attribute key.
`attr_value` : | a GObject.

### g_file_info_clear_status ()

    void                g_file_info_clear_status            (GFileInfo *info);

Clears the status information from `info`.

`info` : | a GFileInfo.

### g_file_info_get_file_type ()

    GFileType           g_file_info_get_file_type           (GFileInfo *info);

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()`.

`info` : | a GFileInfo.
Returns : | a GFileType for the given file.

### g_file_info_get_is_hidden ()

    gboolean            g_file_info_get_is_hidden           (GFileInfo *info);

Checks if a file is hidden.

`info` : | a GFileInfo.
Returns : | `TRUE` if the file is a hidden file, `FALSE` otherwise.

### g_file_info_get_is_backup ()

    gboolean            g_file_info_get_is_backup           (GFileInfo *info);

Checks if a file is a backup file.

`info` : | a GFileInfo.
Returns : | `TRUE` if file is a backup file, `FALSE` otherwise.

### g_file_info_get_is_symlink ()

    gboolean            g_file_info_get_is_symlink          (GFileInfo *info);

Checks if a file is a symlink.

`info` : | a GFileInfo.
Returns : | `TRUE` if the given `info` is a symlink.

### g_file_info_get_name ()

    const char *        g_file_info_get_name                (GFileInfo *info);

Gets the name for a file.

`info` : | a GFileInfo.
Returns : | a string containing the file name.

### g_file_info_get_display_name ()

    const char *        g_file_info_get_display_name        (GFileInfo *info);

Gets a display name for a file.

`info` : | a GFileInfo.
Returns : | a string containing the display name.

### g_file_info_get_edit_name ()

    const char *        g_file_info_get_edit_name           (GFileInfo *info);

Gets the edit name for a file.

`info` : | a GFileInfo.
Returns : | a string containing the edit name.

### g_file_info_get_icon ()

    GIcon *             g_file_info_get_icon                (GFileInfo *info);

Gets the icon for a file.

`info` : | a GFileInfo.
Returns : | GIcon for the given `info`.

### g_file_info_get_content_type ()

    const char *        g_file_info_get_content_type        (GFileInfo *info);

Gets the file's content type.

`info` : | a GFileInfo.
Returns : | a string containing the file's content type.

### g_file_info_get_size ()

    goffset             g_file_info_get_size                (GFileInfo *info);

Gets the file's size.

`info` : | a GFileInfo.
Returns : | a goffset containing the file's size.

### g_file_info_get_modification_time ()

    void                g_file_info_get_modification_time   (GFileInfo *info,
                                                             GTimeVal *result);

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

`info` : | a GFileInfo.
`result` : | a GTimeVal.

### g_file_info_get_symlink_target ()

    const char *        g_file_info_get_symlink_target      (GFileInfo *info);

Gets the symlink target for a given GFileInfo.

`info` : | a GFileInfo.
Returns : | a string containing the symlink target.

### g_file_info_get_etag ()

    const char *        g_file_info_get_etag                (GFileInfo *info);

Gets the entity tag for a given GFileInfo. See `G_FILE_ATTRIBUTE_ETAG_VALUE`.

`info` : | a GFileInfo.
Returns : | a string containing the value of the "etag:value" attribute.

### g_file_info_get_sort_order ()

    gint32              g_file_info_get_sort_order          (GFileInfo *info);

Gets the value of the sort_order attribute from the GFileInfo. See `G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER`.

`info` : | a GFileInfo.
Returns : | a gint32 containing the value of the "standard::sort_order" attribute.

### g_file_info_set_attribute_mask ()

    void                g_file_info_set_attribute_mask      (GFileInfo *info,
                                                             GFileAttributeMatcher *mask);

Sets `mask` on `info` to match specific attribute types.

`info` : | a GFileInfo.
`mask` : | a GFileAttributeMatcher.

### g_file_info_unset_attribute_mask ()

    void                g_file_info_unset_attribute_mask    (GFileInfo *info);

Unsets a mask set by `g_file_info_set_attribute_mask()`, if one is set.

`info` : | GFileInfo.

### g_file_info_set_file_type ()

    void                g_file_info_set_file_type           (GFileInfo *info,
                                                             GFileType type);

Sets the file type in a GFileInfo to `type`. See `G_FILE_ATTRIBUTE_STANDARD_TYPE`.

`info` : | a GFileInfo.
`type` : | a GFileType.

### g_file_info_set_is_hidden ()

    void                g_file_info_set_is_hidden           (GFileInfo *info,
                                                             gboolean is_hidden);

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

`info` : | a GFileInfo.
`is_hidden` : | a gboolean.

### g_file_info_set_is_symlink ()

    void                g_file_info_set_is_symlink          (GFileInfo *info,
                                                             gboolean is_symlink);

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

`info` : | a GFileInfo.
`is_symlink` : | a gboolean.

### g_file_info_set_name ()

    void                g_file_info_set_name                (GFileInfo *info,
                                                             const char *name);

Sets the name attribute for the current GFileInfo. See `G_FILE_ATTRIBUTE_STANDARD_NAME`.

`info` : | a GFileInfo.
`name` : | a string containing a name.

### g_file_info_set_display_name ()

    void                g_file_info_set_display_name        (GFileInfo *info,
                                                             const char *display_name);

Sets the display name for the current GFileInfo. See `G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME`.

`info` : | a GFileInfo.
`display_name` : | a string containing a display name.

### g_file_info_set_edit_name ()

    void                g_file_info_set_edit_name           (GFileInfo *info,
                                                             const char *edit_name);

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

`info` : | a GFileInfo.
`edit_name` : | a string containing an edit name.

### g_file_info_set_icon ()

    void                g_file_info_set_icon                (GFileInfo *info,
                                                             GIcon *icon);

Sets the icon for a given GFileInfo. See `G_FILE_ATTRIBUTE_STANDARD_ICON`.

`info` : | a GFileInfo.
`icon` : | a GIcon.

### g_file_info_set_content_type ()

    void                g_file_info_set_content_type        (GFileInfo *info,
                                                             const char *content_type);

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

`info` : | a GFileInfo.
`content_type` : | a content type. See GContentType.

### g_file_info_set_size ()

    void                g_file_info_set_size                (GFileInfo *info,
                                                             goffset size);

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

`info` : | a GFileInfo.
`size` : | a goffset containing the file's size.

### g_file_info_set_modification_time ()

    void                g_file_info_set_modification_time   (GFileInfo *info,
                                                             GTimeVal *mtime);

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

`info` : | a GFileInfo.
`mtime` : | a GTimeVal.

### g_file_info_set_symlink_target ()

    void                g_file_info_set_symlink_target      (GFileInfo *info,
                                                             const char *symlink_target);

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

`info` : | a GFileInfo.
`symlink_target` : | a static string containing a path to a symlink target.

### g_file_info_set_sort_order ()

    void                g_file_info_set_sort_order          (GFileInfo *info,
                                                             gint32 sort_order);

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

`info` : | a GFileInfo.
`sort_order` : | a sort order integer.

### g_file_attribute_matcher_new ()

    GFileAttributeMatcher * g_file_attribute_matcher_new    (const char *attributes);

Creates a new file attribute matcher, which matches attributes against a given string. GFileAttributeMatchers are reference counted structures, and are created with a reference count of 1. If the number of references falls to 0, the GFileAttributeMatcher is automatically destroyed.

The `attribute` string should be formatted with specific keys separated from namespaces with a double colon. Several "namespace::key" strings may be concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). The wildcard "*" may be used to match all keys and namespaces, or "namespace::*" will match all keys in a given namespace.

Examples of strings to use:

Table 3. File Attribute Matcher strings and results

Matcher String | Matches
--- | ---
"*" | matches all attributes.
"standard::is-hidden" | matches only the key is-hidden in the standard namespace.
"standard::type,unix::*" | matches the type key in the standard namespace and all keys in the unix namespace.

`attributes` : | an attribute string to match.
Returns : | a GFileAttributeMatcher.

### g_file_attribute_matcher_ref ()

    GFileAttributeMatcher * g_file_attribute_matcher_ref    (GFileAttributeMatcher *matcher);

References a file attribute matcher.

`matcher` : | a GFileAttributeMatcher.
Returns : | a GFileAttributeMatcher.

### g_file_attribute_matcher_unref ()

    void                g_file_attribute_matcher_unref      (GFileAttributeMatcher *matcher);

Unreferences `matcher`. If the reference count falls below 1, the `matcher` is automatically freed.

`matcher` : | a GFileAttributeMatcher.

### g_file_attribute_matcher_matches ()

    gboolean            g_file_attribute_matcher_matches    (GFileAttributeMatcher *matcher,
                                                             const char *attribute);

Checks if an attribute will be matched by an attribute matcher. If the matcher was created with the "*" matching string, this function will always return `TRUE`.

`matcher` : | a GFileAttributeMatcher.
`attribute` : | a file attribute key.
Returns : | `TRUE` if `attribute` matches `matcher`. `FALSE` otherwise.

### g_file_attribute_matcher_matches_only ()

    gboolean            g_file_attribute_matcher_matches_only
                                                            (GFileAttributeMatcher *matcher,
                                                             const char *attribute);

Checks if a attribute matcher only matches a given attribute. Always returns `FALSE` if "*" was used when creating the matcher.

`matcher` : | a GFileAttributeMatcher.
`attribute` : | a file attribute key.
Returns : | `TRUE` if the matcher only matches `attribute`. `FALSE` otherwise.

### g_file_attribute_matcher_enumerate_namespace ()

    gboolean            g_file_attribute_matcher_enumerate_namespace
                                                            (GFileAttributeMatcher *matcher,
                                                             const char *ns);

Checks if the matcher will match all of the keys in a given namespace. This will always return `TRUE` if a wildcard character is in use (e.g. if matcher was created with "standard::*" and `ns` is "standard", or if matcher was created using "*" and namespace is anything.)

TODO: this is awkwardly worded.

`matcher` : | a GFileAttributeMatcher.
`ns` : | a string containing a file attribute namespace.
Returns : | `TRUE` if the matcher matches all of the entries in the given `ns`, `FALSE` otherwise.

### g_file_attribute_matcher_enumerate_next ()

    const char *        g_file_attribute_matcher_enumerate_next
                                                            (GFileAttributeMatcher *matcher);

Gets the next matched attribute from a GFileAttributeMatcher.

`matcher` : | a GFileAttributeMatcher.
Returns : | a string containing the next attribute or `NULL` if no more attribute exist.

## See Also

#GFile, GFileAttribute