Function create_mtree_file_in_dir

Source
fn create_mtree_file_in_dir(
    path: impl AsRef<Path>,
    mtree_data: &[u8],
    schema: MtreeSchema,
) -> Result<PathBuf, Error>
Expand description

Creates an ALPM-MTREE file in a directory.

Validates the mtree_data based on schema and then creates the ALPM-MTREE file in path using mtree_data.

ยงErrors

Returns an error if

  • the mtree_data is not valid according to schema,
  • creating the ALPM-MTREE file in path fails,
  • or gzip compressing the ALPM-MTREE file fails.