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.
- Path
Defaults - 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 prefixMTREE_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 astd::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.