cli_rs: Scaffolding for eden du command

Reviewed By: fanzeyi

Differential Revision: D32368654

fbshipit-source-id: d047ece5e6544e408fbd7038d665012dc9494b09
This commit is contained in:
Grace Ku 2021-12-02 18:02:07 -08:00 committed by Facebook GitHub Bot
parent 7b64c617bf
commit 400c0caa31
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
//! edenfsctl du
use async_trait::async_trait;
use structopt::StructOpt;
use anyhow::Error;
use edenfs_client::EdenFsInstance;
use edenfs_error::{EdenFsError, Result};
use crate::ExitCode;
#[derive(StructOpt, Debug)]
#[structopt(about = "Show disk space usage for a checkout")]
pub struct DiskUsageCmd {}
#[async_trait]
impl crate::Subcommand for DiskUsageCmd {
async fn run(&self, instance: EdenFsInstance) -> Result<ExitCode> {
Err(EdenFsError::Other(Error::msg("Not implemented yet.")))
}
}

View File

@ -18,6 +18,7 @@ use util::path::expand_path;
mod config;
mod debug;
mod du;
mod gc;
mod humantime;
mod minitop;
@ -85,6 +86,7 @@ pub enum TopLevelSubcommand {
Debug(crate::debug::DebugCmd),
// Top(crate::top::TopCmd),
Minitop(crate::minitop::MinitopCmd),
// Du(crate::du::DiskUsageCmd),
}
#[async_trait]
@ -100,6 +102,7 @@ impl Subcommand for TopLevelSubcommand {
Debug(cmd) => cmd,
// Top(cmd) => cmd,
Minitop(cmd) => cmd,
// Du(cmd) => cmd,
};
sc.run(instance).await
}