libappstream::functions

Function utils_install_metadata_file

source
pub fn utils_install_metadata_file(
    location: MetadataLocation,
    filename: &str,
    origin: &str,
    destdir: &str,
) -> Result<(), Error>
Expand description

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.

§location

the MetadataLocation, e.g. MetadataLocation::Cache

§filename

the full path of the file to install

§origin

the origin to use for the installation, or None

§destdir

the destdir to use, or None

§Returns

true for success, false if error is set