## AgsFileWidget

AgsFileWidget — a file widget widget

## Stability Level

Stable, unless otherwise indicated

## Functions

gboolean | ags_file_widget_test_flags ()
void | ags_file_widget_set_flags ()
void | ags_file_widget_unset_flags ()
gboolean | ags_file_widget_test_file_action ()
void | ags_file_widget_set_file_action ()
gboolean | ags_file_widget_test_file_filter ()
void | ags_file_widget_set_file_filter ()
void | ags_file_widget_set_default_bundle ()
gchar * | ags_file_widget_get_default_bundle ()
void | ags_file_widget_set_home_path ()
gchar * | ags_file_widget_get_home_path ()
void | ags_file_widget_set_app_home_path ()
gchar * | ags_file_widget_get_app_home_path ()
void | ags_file_widget_set_app_generic_path ()
gchar * | ags_file_widget_get_app_generic_path ()
void | ags_file_widget_set_default_path ()
gchar * | ags_file_widget_get_default_path ()
void | ags_file_widget_set_current_path ()
gchar * | ags_file_widget_get_current_path ()
void | ags_file_widget_set_recently_used_filename ()
gchar * | ags_file_widget_get_recently_used_filename ()
void | ags_file_widget_set_bookmark_filename ()
gchar * | ags_file_widget_get_bookmark_filename ()
void | ags_file_widget_set_file_magic_executable ()
gchar * | ags_file_widget_get_file_magic_executable ()
gchar ** | ags_file_widget_get_recently_used ()
void | ags_file_widget_read_recently_used ()
void | ags_file_widget_write_recently_used ()
GHashTable * | ags_file_widget_get_location ()
void | ags_file_widget_add_location ()
void | ags_file_widget_remove_location ()
GHashTable * | ags_file_widget_get_bookmark ()
void | ags_file_widget_add_bookmark ()
void | ags_file_widget_remove_bookmark ()
void | ags_file_widget_read_bookmark ()
void | ags_file_widget_write_bookmark ()
gchar ** | ags_file_widget_get_file_filter_suffix ()
gchar * | ags_file_widget_get_filename ()
GSList * | ags_file_widget_get_filenames ()
void | ags_file_widget_refresh ()
void | ags_file_widget_create_dir ()
AgsFileWidget * | ags_file_widget_new ()

## Types and Values

#define | AGS_FILE_WIDGET_MAX_RECENTLY_USED
#define | AGS_FILE_WIDGET_LOCATION_OPEN_RECENT
#define | AGS_FILE_WIDGET_LOCATION_OPEN_START_HERE
#define | AGS_FILE_WIDGET_LOCATION_OPEN_USER_HOME
#define | AGS_FILE_WIDGET_LOCATION_OPEN_USER_DESKTOP
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_PICTURES
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_MUSIC
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_VIDEOS
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_DOWNLOADS
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_DOCUMENTS
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_APP_HOME
#define | AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_APP_GENERIC
#define | AGS_FILE_WIDGET_DEFAULT_FILE_MAGIC_EXECUTABLE
enum | AgsFileWidgetFlags
enum | AgsFileWidgetFileAction
enum | AgsFileWidgetFileFilter

## Includes

    #include <ags/widget/ags_file_widget.h>

## Description

AgsFileWidget is a widget to open or save files.

## Functions

### ags_file_widget_test_flags ()

    gboolean
    ags_file_widget_test_flags (AgsFileWidget *file_widget,
                                guint flags);

Test `flags` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
flags | the flags |

#### Returns

`TRUE` if flags set, otherwise `FALSE`

Since: 6.6.0

### ags_file_widget_set_flags ()

    void
    ags_file_widget_set_flags (AgsFileWidget *file_widget,
                               guint flags);

Set `flags` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
flags | the flags |

Since: 6.6.0

### ags_file_widget_unset_flags ()

    void
    ags_file_widget_unset_flags (AgsFileWidget *file_widget,
                                 guint flags);

Set `flags` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
flags | the flags |

Since: 6.6.0

### ags_file_widget_test_file_action ()

    gboolean
    ags_file_widget_test_file_action (AgsFileWidget *file_widget,
                                      guint file_action);

Test `file_action` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
file_action | the file action |

#### Returns

`TRUE` if file action matches, otherwise `FALSE`

Since: 6.6.0

### ags_file_widget_set_file_action ()

    void
    ags_file_widget_set_file_action (AgsFileWidget *file_widget,
                                     guint file_action);

Set `file_action` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
file_action | the file action |

Since: 6.6.0

### ags_file_widget_test_file_filter ()

    gboolean
    ags_file_widget_test_file_filter (AgsFileWidget *file_widget,
                                      guint file_filter);

Test `file_filter` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
file_filter | the file filter |

#### Returns

`TRUE` if file filter matches, otherwise `FALSE`

Since: 6.6.0

### ags_file_widget_set_file_filter ()

    void
    ags_file_widget_set_file_filter (AgsFileWidget *file_widget,
                                     guint file_filter);

Set `file_filter` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
file_filter | the file filter |

Since: 6.6.0

### ags_file_widget_set_default_bundle ()

    void
    ags_file_widget_set_default_bundle (AgsFileWidget *file_widget,
                                        gchar *default_bundle);

Set `default_bundle` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
default_bundle | the default bundle |

Since: 6.6.0

### ags_file_widget_get_default_bundle ()

    gchar *
    ags_file_widget_get_default_bundle (AgsFileWidget *file_widget);

Get default bundle of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the default bundle as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_home_path ()

    void
    ags_file_widget_set_home_path (AgsFileWidget *file_widget,
                                   gchar *home_path);

Set `home_path` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
home_path | the home path |

Since: 6.6.0

### ags_file_widget_get_home_path ()

    gchar *
    ags_file_widget_get_home_path (AgsFileWidget *file_widget);

Get home path of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the home path as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_app_home_path ()

    void
    ags_file_widget_set_app_home_path (AgsFileWidget *file_widget,
                                       gchar *app_home_path);

Set `app_home_path` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
app_home_path | the app home path |

Since: 6.6.0

### ags_file_widget_get_app_home_path ()

    gchar *
    ags_file_widget_get_app_home_path (AgsFileWidget *file_widget);

Get app home path of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the app home path as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_app_generic_path ()

    void
    ags_file_widget_set_app_generic_path (AgsFileWidget *file_widget,
                                          gchar *app_generic_path);

Set `app_generic_path` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
app_generic_path | the app generic path |

Since: 6.6.0

### ags_file_widget_get_app_generic_path ()

    gchar *
    ags_file_widget_get_app_generic_path (AgsFileWidget *file_widget);

Get app generic path of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the app generic path as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_default_path ()

    void
    ags_file_widget_set_default_path (AgsFileWidget *file_widget,
                                      gchar *default_path);

Set `default_path` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
default_path | the default path |

Since: 6.6.0

### ags_file_widget_get_default_path ()

    gchar *
    ags_file_widget_get_default_path (AgsFileWidget *file_widget);

Get default path of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the default path as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_current_path ()

    void
    ags_file_widget_set_current_path (AgsFileWidget *file_widget,
                                      gchar *current_path);

Set `current_path` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
current_path | the current path |

Since: 6.6.0

### ags_file_widget_get_current_path ()

    gchar *
    ags_file_widget_get_current_path (AgsFileWidget *file_widget);

Get current path of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the current path as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_recently_used_filename ()

    void
    ags_file_widget_set_recently_used_filename
                                   (AgsFileWidget *file_widget,
                                    gchar *recently_used_filename);

Set `recently_used_filename` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
recently_used_filename | the recently used filename |

Since: 6.6.0

### ags_file_widget_get_recently_used_filename ()

    gchar *
    ags_file_widget_get_recently_used_filename
                                   (AgsFileWidget *file_widget);

Get recently used filename of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the home path as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_bookmark_filename ()

    void
    ags_file_widget_set_bookmark_filename (AgsFileWidget *file_widget,
                                           gchar *bookmark_filename);

Set `bookmark_filename` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
bookmark_filename | the bookmark filename |

Since: 6.6.0

### ags_file_widget_get_bookmark_filename ()

    gchar *
    ags_file_widget_get_bookmark_filename (AgsFileWidget *file_widget);

Get bookmark filename of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the bookmark filename as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_set_file_magic_executable ()

    void
    ags_file_widget_set_file_magic_executable
                                   (AgsFileWidget *file_widget,
                                    gchar *file_magic_executable);

Set `file_magic_executable` of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
file_magic_executable | the file magic executable |

Since: 6.6.0

### ags_file_widget_get_file_magic_executable ()

    gchar *
    ags_file_widget_get_file_magic_executable
                                   (AgsFileWidget *file_widget);

Get file magic executable of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the file magic executable as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_get_recently_used ()

    gchar **
    ags_file_widget_get_recently_used (AgsFileWidget *file_widget,
                                       guint *strv_length);

Get recently used from `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |
strv_length | the string vector length. | [out]

#### Returns

the recently used string vector.

[transfer full]

Since: 6.6.0

### ags_file_widget_read_recently_used ()

    void
    ags_file_widget_read_recently_used (AgsFileWidget *file_widget);

Read recently-used from recently-used-filename.

#### Parameters

file_widget | the AgsFileWidget |

Since: 6.6.0

### ags_file_widget_write_recently_used ()

    void
    ags_file_widget_write_recently_used (AgsFileWidget *file_widget);

Write recently_useds from recently_used-filename.

#### Parameters

file_widget | the AgsFileWidget |

Since: 6.6.0

### ags_file_widget_get_location ()

    GHashTable *
    ags_file_widget_get_location (AgsFileWidget *file_widget);

Get location from `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the location GHashTable.

[transfer container]

Since: 6.6.0

### ags_file_widget_add_location ()

    void
    ags_file_widget_add_location (AgsFileWidget *file_widget,
                                  gchar *button_action,
                                  gchar *button_text);

Add `button_action` to location with `button_text` .

#### Parameters

file_widget | the AgsFileWidget |
button_action | the button action |
button_text | the button text |

Since: 6.6.0

### ags_file_widget_remove_location ()

    void
    ags_file_widget_remove_location (AgsFileWidget *file_widget,
                                     gchar *button_action);

Remove `button_action` from location with `button_text` .

#### Parameters

file_widget | the AgsFileWidget |
button_action | the button action |

Since: 6.6.0

### ags_file_widget_get_bookmark ()

    GHashTable *
    ags_file_widget_get_bookmark (AgsFileWidget *file_widget);

Get bookmark from `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the bookmark GHashTable.

[transfer container]

Since: 6.6.0

### ags_file_widget_add_bookmark ()

    void
    ags_file_widget_add_bookmark (AgsFileWidget *file_widget,
                                  gchar *bookmark_location);

Add `bookmark_location` to bookmark with `button_text` .

#### Parameters

file_widget | the AgsFileWidget |
bookmark_location | the bookmark location |

Since: 6.6.0

### ags_file_widget_remove_bookmark ()

    void
    ags_file_widget_remove_bookmark (AgsFileWidget *file_widget,
                                     gchar *bookmark_location);

Remove `bookmark_location` from bookmark with `button_text` .

#### Parameters

file_widget | the AgsFileWidget |
bookmark_location | the bookmark location |

Since: 6.6.0

### ags_file_widget_read_bookmark ()

    void
    ags_file_widget_read_bookmark (AgsFileWidget *file_widget);

Read bookmarks from bookmark-filename.

#### Parameters

file_widget | the AgsFileWidget |

Since: 6.6.0

### ags_file_widget_write_bookmark ()

    void
    ags_file_widget_write_bookmark (AgsFileWidget *file_widget);

Write bookmarks from bookmark-filename.

#### Parameters

file_widget | the AgsFileWidget |

Since: 6.6.0

### ags_file_widget_get_file_filter_suffix ()

    gchar **
    ags_file_widget_get_file_filter_suffix
                                   (AgsFileWidget *file_widget);

### ags_file_widget_get_filename ()

    gchar *
    ags_file_widget_get_filename (AgsFileWidget *file_widget);

Get filename of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the filename as string.

[transfer full]

Since: 6.6.0

### ags_file_widget_get_filenames ()

    GSList *
    ags_file_widget_get_filenames (AgsFileWidget *file_widget);

Get filenames of `file_widget` .

#### Parameters

file_widget | the AgsFileWidget |

#### Returns

the filename as string.

[element-type utf8][transfer full]

Since: 6.6.0

### ags_file_widget_refresh ()

    void
    ags_file_widget_refresh (AgsFileWidget *file_widget);

Refresh `file_widget` due to current path change.

#### Parameters

file_widget | the AgsFileWidget |

Since: 6.6.0

### ags_file_widget_create_dir ()

    void
    ags_file_widget_create_dir (AgsFileWidget *file_widget,
                                gchar *dir_path);

Create directory `dir_path` .

#### Parameters

file_widget | the AgsFileWidget |
dir_path | the directory path |

Since: 6.6.0

### ags_file_widget_new ()

    AgsFileWidget *
    ags_file_widget_new ();

Creates a new instance of AgsFileWidget.

#### Returns

the new AgsFileWidget

Since: 6.6.0

## Types and Values

### AGS_FILE_WIDGET_MAX_RECENTLY_USED

    #define AGS_FILE_WIDGET_MAX_RECENTLY_USED (24)

### AGS_FILE_WIDGET_LOCATION_OPEN_RECENT

    #define AGS_FILE_WIDGET_LOCATION_OPEN_RECENT "document-open-recent"

### AGS_FILE_WIDGET_LOCATION_OPEN_START_HERE

    #define AGS_FILE_WIDGET_LOCATION_OPEN_START_HERE "open-start-here"

### AGS_FILE_WIDGET_LOCATION_OPEN_USER_HOME

    #define AGS_FILE_WIDGET_LOCATION_OPEN_USER_HOME "open-user-home"

### AGS_FILE_WIDGET_LOCATION_OPEN_USER_DESKTOP

    #define AGS_FILE_WIDGET_LOCATION_OPEN_USER_DESKTOP "open-user-desktop"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_PICTURES

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_PICTURES "open-folder-pictures"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_MUSIC

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_MUSIC "open-folder-music"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_VIDEOS

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_VIDEOS "open-folder-videos"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_DOWNLOADS

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_DOWNLOADS "open-folder-downloads"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_DOCUMENTS

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_DOCUMENTS "open-folder-documents"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_APP_HOME

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_APP_HOME "open-app-home"

### AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_APP_GENERIC

    #define AGS_FILE_WIDGET_LOCATION_OPEN_FOLDER_APP_GENERIC "open-app-generic"

### AGS_FILE_WIDGET_DEFAULT_FILE_MAGIC_EXECUTABLE

    #define AGS_FILE_WIDGET_DEFAULT_FILE_MAGIC_EXECUTABLE "/usr/bin/ags-file"

### enum AgsFileWidgetFlags

#### Members

AGS_FILE_WIDGET_APP_SANDBOX |  |
AGS_FILE_WIDGET_WITH_MULTI_SELECTION |  |
AGS_FILE_WIDGET_WITH_PREVIEW |  |
AGS_FILE_WIDGET_HIDDEN_FILES_VISIBLE |  |

### enum AgsFileWidgetFileAction

#### Members

AGS_FILE_WIDGET_OPEN |  |
AGS_FILE_WIDGET_SAVE_AS |  |

### enum AgsFileWidgetFileFilter

#### Members

AGS_FILE_WIDGET_FILTER_NONE |  |
AGS_FILE_WIDGET_FILTER_BY_SUFFIX |  |