mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
cli_rs: Scaffolding for eden du
command
Reviewed By: fanzeyi Differential Revision: D32368654 fbshipit-source-id: d047ece5e6544e408fbd7038d665012dc9494b09
This commit is contained in:
parent
7b64c617bf
commit
400c0caa31
28
eden/fs/cli_rs/edenfs-commands/src/du.rs
Normal file
28
eden/fs/cli_rs/edenfs-commands/src/du.rs
Normal 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.")))
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user