Search

Lib.rs

› Filesystem
#btrfs #wrapper #libbtrfsutil

btrfsutil

Safe wrappers for libbtrfsutil

by Cezar, Alex Pearson

  • Install
  • API reference
  • GitHub repo (cezarmathe)

2 unstable releases

0.2.0 Oct 5, 2023
0.1.0 May 5, 2020

#2213 in Filesystem


Used in bitters

MIT license

59KB
1K SLoC

btrfsutil-rs

Pre-release Checks btrfsutil docs libbtrfsutil version License: MIT

Safe wrappers for libbtrfsutil.

Building

This library links to libbtrfsutil, a shared library provided by installing btrfs-progs on most Linux systems.

  • Arch Linux: pacman -S btrfs-progs
  • Ubuntu: apt install btrfs-progs

Usage

Add the latest version to your project with:

cargo add btrfsutil

For further details, please refer to the documentation.

Also, please keep in mind that many of the operations this library can perform may require elevated privileges(CAP_SYSTEM_ADMIN).

Examples

Examples require elevated privileges. Environment variables can be used to run examples with sudo, like so:

CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo run --example subvolume_iterator_info

Dependencies

~1.4–4MB
~75K SLoC

  • bitflags 1.2
  • btrfsutil-sys
  • chrono
  • libc
  • thiserror 1.0
  • uuid 0.8.1
  • dev libmount
  • dev loopdev 0.4
  • dev nix 0.18
  • dev tempfile

Other feature

  • enable-glue-errors
Related: btrfsutil-sys
See also: reflink-copy, libbtrfsutil, btrfs-backup, btrfs-transaction, btrfs-mkfs, btrfs-disk, inkwell, parcopy, libbtrfs

Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski. It contains data from multiple sources, including heuristics, and manually curated data. Content of this page is not necessarily endorsed by the authors of the crate. This site is not affiliated with nor endorsed by the Rust Project. If something is missing or incorrect, please file a bug.