as-utils-private 3 APPSTREAM Library
as-utils-private

## Functions

#define | GS_DEFINE_CLEANUP_FUNCTION()
gboolean | as_utils_touch_dir ()
gboolean | as_utils_delete_dir_recursive ()
gchar * | as_string_strip ()
GPtrArray * | as_utils_categories_from_strv ()
GPtrArray * | as_utils_categories_from_str ()
GPtrArray * | as_utils_find_files_matching ()
GPtrArray * | as_utils_find_files ()
gboolean | as_utils_is_root ()
gchar * | as_str_replace ()
gchar * | as_get_locale ()

## Description

## Functions

### GS_DEFINE_CLEANUP_FUNCTION()

    #define             GS_DEFINE_CLEANUP_FUNCTION(Type, name, func)

GS_DEFINE_CLEANUP_FUNCTION

### as_utils_touch_dir ()

    gboolean
    as_utils_touch_dir (const gchar *dirname);

#### Returns

as_utils_touch_dir

### as_utils_delete_dir_recursive ()

    gboolean
    as_utils_delete_dir_recursive (const gchar *dirname);

Remove folder like rm -r does

#### Parameters

dirname | Directory to remove |

#### Returns

TRUE if operation was successful

as_utils_delete_dir_recursive

### as_string_strip ()

    gchar *
    as_string_strip (const gchar *str);

#### Returns

as_string_strip

### as_utils_categories_from_strv ()

    GPtrArray *
    as_utils_categories_from_strv (gchar **categories_strv,
                                   GPtrArray *system_categories);

Create a list of categories from string array

#### Parameters

categories_strv | a string array |
system_categories | list of AsCategory objects available on this system |

#### Returns

GPtrArray of AsCategory objcts matching the strings in the array.

[element-type AsCategory][transfer full]

as_utils_categories_from_strv

### as_utils_categories_from_str ()

    GPtrArray *
    as_utils_categories_from_str (const gchar *categories_str,
                                  GPtrArray *system_categories);

Create a list of categories from semicolon-separated string

#### Parameters

categories_str | string with semicolon-separated categories |
system_categories | list of AsCategory objects available on this system |

#### Returns

GPtrArray of AsCategory objcts matching the strings in the array.

[element-type AsCategory][transfer full]

as_utils_categories_from_str

### as_utils_find_files_matching ()

    GPtrArray *
    as_utils_find_files_matching (const gchar *dir,
                                  const gchar *pattern,
                                  gboolean recursive);

#### Returns

as_utils_find_files_matching

### as_utils_find_files ()

    GPtrArray *
    as_utils_find_files (const gchar *dir,
                         gboolean recursive);

#### Returns

as_utils_find_files

### as_utils_is_root ()

    gboolean
    as_utils_is_root (void);

#### Returns

as_utils_is_root

### as_str_replace ()

    gchar *
    as_str_replace (const gchar *str,
                    const gchar *old_str,
                    const gchar *new_str);

#### Returns

as_str_replace

### as_get_locale ()

    gchar *
    as_get_locale (void);

Returns a locale string as used in the AppStream specification.

#### Returns

A locale string, free with `g_free()`.

[transfer full]

as_get_locale

## Types and Values