Crates.io | hashdir |
lib.rs | hashdir |
version | 0.2.0 |
source | src |
created_at | 2019-02-20 09:30:25.616494 |
updated_at | 2019-02-21 19:28:48.745809 |
description | Generate a cryptographic view of a directory's contents |
homepage | |
repository | https://github.com/47ng/hashdir |
max_upload_size | |
id | 115926 |
size | 7,347 |
Generate a cryptographic view of a directory's contents.
use hashdir::DirNode;
fn main() {
let path = std::env::current_dir().unwrap();
let node = DirNode::from_path(&path, &path).unwrap();
println!("{:#?}", node);
}
JSON Output (with serde_json
):
{
"path": "./",
"hash": "QZxKfmJir+ZeG3K2vNxQGgcSHjhsCroJuRGNZUth0HA=",
"children": [
{
"path": "./lib.rs",
"hash": "X65gIOpFCSJzOZTlKoSlPp2Zg02F8n6c6nYopAOXHcc=",
"size": 3157
},
{
"path": "./flat.json",
"hash": "NAKMmbFrkytNFmsGz8pHuugiBY14DnjWGyBNwkUNR7A=",
"size": 382
}
]
}