Module v2

Source
Expand description

Interpreter for ALPM-MTREE v1 and v2.

Re-exports§

pub use crate::parser::PathType;

Structs§

Directory
A directory type path statement in an mtree file.
File
A file type path statement in an mtree file.
Link
A link type path in an mtree file that points to a file somewhere on the system.
PathDefaults
Represents a /set line in an MTREE file.

Enums§

Path
Represents the three possible types inside a path type line of an MTREE file.

Constants§

MTREE_PATH_PREFIX
The prefix that is used in all ALPM-MTREE paths.

Functions§

content_line 🔒
Return the nth line of a given file’s content.
ensure_property 🔒
Take any given property and ensure that it’s set.
normalize_mtree_path 🔒
Normalizes a std::path::Path by stripping the prefix MTREE_PATH_PREFIX.
parse_mtree_v2
Parse the content of an MTREE v2 file.
path_from_parsed 🔒
Create the actual final MTREE path representation from the parsed input.
path_metadata 🔒
Returns the Metadata of a std::path::Path.
paths_from_parsed_content 🔒
Take unsanitized parsed content and convert it to a list of sorted paths with properties.
serialize_checksum_as_hex 🔒
Serialize an Option<Checksum<D>> as a HexString.
serialize_optional_checksum_as_hex 🔒
Serialize an Option<Checksum<D>>
validate_path_common 🔒
Validates common path features against relevant Mtree data.