## GFileIcon GFileIcon — Icons pointing to an image file |

## Functions

GIcon * | g_file_icon_new ()
GFile * | g_file_icon_get_file ()

## Properties

GFile * | file | Read / Write / Construct Only

## Types and Values

| GFileIcon

## Object Hierarchy

        GObject
        ╰── GFileIcon

## Implemented Interfaces

GFileIcon implements GIcon and GLoadableIcon.

## Includes

    #include <gio/gio.h>

## Description

GFileIcon specifies an icon by pointing to an image file to be used as icon.

## Functions

### g_file_icon_new ()

    GIcon *
    g_file_icon_new (GFile *file);

Creates a new icon for a file.

#### Parameters

file | a GFile. |

#### Returns

a GIcon for the given `file` , or `NULL` on error.

[transfer full][type GFileIcon]

### g_file_icon_get_file ()

    GFile *
    g_file_icon_get_file (GFileIcon *icon);

Gets the GFile associated with the given `icon` .

#### Parameters

icon | a GIcon. |

#### Returns

a GFile, or `NULL`.

[transfer none]

## Types and Values

### GFileIcon

    typedef struct _GFileIcon GFileIcon;

Gets an icon for a GFile. Implements GLoadableIcon.

## Property Details

### The `“file”` property

      “file”                     GFile *

The file containing the icon.

Flags: Read / Write / Construct Only

## See Also

GIcon, GLoadableIcon