fn print_file_system_node_details(dir: &FileTreeNode, dirs: u64, files: u64) {
    let mut siblings = HashMap::new();
    let mut table = Table::new();
    let format = FormatBuilder::new()
        .column_separator(' ')
        .padding(0, 1)
        .build();
    table.set_format(format);
    table.add_row(row!["SIZE", "CREATED", "MODIFIED", "NAME"]);

    print_file_system_node_details_body(dir, 0, &mut siblings, &mut table);

    table.printstd();

    // print summary row
    println!(
        "\n{} {}, {} {}",
        dirs,
        pluralize("directory", "directories", dirs),
        files,
        pluralize("file", "files", files),
    );
}
// A function to print a FileTreeNode in format similar to unix `tree` command.
// File details are displayed in a table to the left of the tree.
// prints a summary row below the main body.
A function to print a FileTreeNode in format similar to unix `tree` command.
File details are displayed in a table to the left of the tree.
prints a summary row below the main body.
A function to print a FileTreeNode in format similar to unix ` tree ` command . File details are displayed in a table to the left of the tree . prints a summary row below the main body .
fn print_file_system_node_details(dir: &FileTreeNode, dirs: u64, files: u64) {
    let mut siblings = HashMap::new();
    let mut table = Table::new();
    let format = FormatBuilder::new()
        .column_separator(' ')
        .padding(0, 1)
        .build();
    table.set_format(format);
    table.add_row(row!["SIZE", "CREATED", "MODIFIED", "NAME"]);
    print_file_system_node_details_body(dir, 0, &mut siblings, &mut table);
    table.printstd();
    // print summary row
    println!(
        "\n{} {}, {} {}",
        dirs,
        pluralize("directory", "directories", dirs),
        files,
        pluralize("file", "files", files),
    );
}
fn print_file_system_node_details ( dir : & FileTreeNode , dirs : u64 , files : u64 ) { let mut siblings = HashMap :: new ( ) ; let mut table = Table :: new ( ) ; let format = FormatBuilder :: new ( ) . column_separator ( ' ' ) . padding ( 0 , 1 ) . build ( ) ; table . set_format ( format ) ; table . add_row ( row ! [ " " " " " " " " ] ) ; print_file_system_node_details_body ( dir , 0 , & mut siblings , & mut table ) ; table . printstd ( ) ; // print summary row println ! ( " \n " dirs pluralize ( " " " " dirs ) files pluralize ( " " " " files ) ) ; }
A function to print a FileTreeNode in format similar to unix `tree` command.
A function to print a FileTreeNode in format similar to unix ` tree ` command .
dir
&FileTreeNode
dirs
u64
files
u64
dir
&FileTreeNode
dirs
u64
files
u64