pub fn parse_mtree_v2(content: String) -> Result<Vec<Path>, Error>
Expand description
Parse the content of an MTREE v2 file.
This parser is backwards compatible to v1
, in the sense that it allows md5
checksums, but
doesn’t require them.
§Example
use alpm_mtree::mtree::v2::parse_mtree_v2;
let content = r#"
/set uid=0 gid=0 mode=644 type=link
./some_link link=/etc time=1706086640.0
"#;
let paths = parse_mtree_v2(content.to_string())?;
§Errors
Error::ParseError
if a malformed MTREE file is encountered.Error::InterpreterError
if there’s missing fields or logical error in the parsed contents of the MTREE file.