Expand description
§alpm-mtree
§Documentation
- https://alpm.archlinux.page/rustdoc/alpm_mtree/ for development version of the crate
- https://docs.rs/alpm-mtree/latest/alpm_mtree/ for released versions of the crate
§Examples
§Library
use alpm_mtree::mtree::v2::parse_mtree_v2;
let data = r#"#mtree
/set mode=644 uid=0 gid=0 type=file
./some_file time=1700000000.0 size=1337 sha256digest=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
./some_link type=link link=some_file time=1700000000.0
./some_dir type=dir time=1700000000.0
"#.to_string();
assert!(parse_mtree_v2(data).is_ok());§Commandline
Validate an .MTREE file.
alpm-mtree validate path/to/fileParse an .MTREE file and output its contents as structured data.
alpm-mtree format ~/.cache/alpm/testing/packages/core/argon2-20190702-6-x86_64/.MTREE --output-format json --pretty§Features
cliadds the commandline handling needed for thealpm-mtreebinary (enabled by default).creationadds library support for the creation of ALPM-MTREE files (enabled by default)._winnow-debugenables thewinnow/debugfeature, which shows the exact parsing process of winnow.
§Contributing
Please refer to the contribution guidelines to learn how to contribute to this project.
§License
This project can be used under the terms of the Apache-2.0 or MIT. Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.
Re-exports§
pub use file::create::create_mtree_v1_from_input_dir;pub use file::create::create_mtree_v2_from_input_dir;pub use file::error::Error as CreationError;pub use mtree::Mtree;pub use mtree::v2::parse_mtree_v2;
Modules§
- cli
- Commandline argument handling. This is most likely not interesting for you.
- commands
- Commandline functions, that’re called by the
alpm-mtreeexecutable. - error 🔒
- file
- Mtree file creation.
- mtree
- Handling for the ALPM-MTREE file format.
- parser
- Low-level parser for MTREE files. You’ll likely want to use
parse_mtree_v2instead. - path_
decoder 🔒 - MTREE files use a special non-ascii encoding for their paths.
- schema 🔒
- Schemas for ALPM-MTREE data.
- utils 🔒
- File handling integration.
Enums§
- Error
- The Error that can occur when working with ALPM-MTREE
- Mtree
Schema - An enum tracking all available ALPM-MTREE schemas.