AppStream.utils_install_metadata_file
Description: Reference for AppStream.utils_install_metadata_file

### Function

# AppStreamutils_install_metadata_file

since: 0.14.0

#### Declaration [src]

    gboolean
    as_utils_install_metadata_file (
      AsMetadataLocation location,
      const gchar* filename,
      const gchar* origin,
      const gchar* destdir,
      GError** error
    )

#### Description [src]

Installs an AppStream MetaInfo, AppStream Metadata Catalog or AppStream Icon tarball file to the right place on the filesystem. Please note that this function does almost no validation and may guess missing values such as icon sizes and origin names. Ensure your metadata is good before installing it.

Available since: 0.14.0

#### Parameters

`location`

  Type: `AsMetadataLocation`

  The `AsMetadataLocation`, e.g. `AS_METADATA_LOCATION_CACHE`.

`filename`

  Type: `const gchar*`

  The full path of the file to install.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`origin`

  Type: `const gchar*`

  The origin to use for the installation, or `NULL`.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`destdir`

  Type: `const gchar*`

  The destdir to use, or `NULL`.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the function if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` for success, `FALSE` if error is set.