multiversx_sc_meta/cmd/
info.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use crate::{
    cli::InfoArgs,
    folder_structure::{dir_pretty_print, RelevantDirectories},
    version_history::LAST_UPGRADE_VERSION,
};

use super::print_util::print_tree_dir_metadata;

pub fn call_info(args: &InfoArgs) {
    let path = if let Some(some_path) = &args.path {
        some_path.as_str()
    } else {
        "./"
    };

    let dirs = RelevantDirectories::find_all(path, args.ignore.as_slice());
    dir_pretty_print(dirs.iter(), "", &|dir| {
        print_tree_dir_metadata(dir, &LAST_UPGRADE_VERSION)
    });
}