Diplaying xattrs (re #1)

pull/10/head
Dennis Schwerdel 6 years ago
parent f7899bb9f3
commit 3cb21cb59e

@ -11,6 +11,7 @@ use std::collections::HashMap;
use std::io::{BufReader, BufRead};
use std::fs::File;
use std::env;
use std::str;
use std::path::Path;
use self::args::Arguments;
@ -175,6 +176,16 @@ fn print_inode(inode: &Inode) {
println!(" - {}", name);
}
}
if !inode.xattrs.is_empty() {
println!("Extended attributes:");
for (key, value) in &inode.xattrs {
if let Ok(value) = str::from_utf8(value) {
println!(" - {} = '{}'", key, value);
} else {
println!(" - {} = 0x{}", key, to_hex(value));
}
}
}
}
fn print_backups(backup_map: &HashMap<String, Backup>) {

Loading…
Cancel
Save