hashdir

Crates.iohashdir
lib.rshashdir
version0.2.0
sourcesrc
created_at2019-02-20 09:30:25.616494
updated_at2019-02-21 19:28:48.745809
descriptionGenerate a cryptographic view of a directory's contents
homepage
repositoryhttps://github.com/47ng/hashdir
max_upload_size
id115926
size7,347
François Best (franky47)

documentation

https://docs.rs/hashdir

README

hashdir

Build Status Crates.io Crates.io

Generate a cryptographic view of a directory's contents.

Usage

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
    }
  ]
}
Commit count: 36

cargo fmt