Skip to main content

btrfs_cli/inspect/
dump_tree.rs

1use crate::{Format, Runnable};
2use anyhow::Result;
3use clap::Parser;
4use std::path::PathBuf;
5
6/// Dump tree blocks from a btrfs filesystem
7#[derive(Parser, Debug)]
8pub struct DumpTreeCommand {
9    /// Path to a file or directory on the btrfs filesystem
10    path: PathBuf,
11
12    /// Only dump blocks from this tree
13    #[clap(short = 't', long)]
14    tree: Option<u64>,
15
16    /// Only dump blocks at this block number
17    #[clap(short = 'b', long)]
18    block: Option<u64>,
19}
20
21impl Runnable for DumpTreeCommand {
22    fn run(&self, _format: Format, _dry_run: bool) -> Result<()> {
23        todo!("implement dump-tree")
24    }
25}