Skip to content
/ hashdir Public

Generate a cryptographic view of a directory's contents

License

Notifications You must be signed in to change notification settings

47ng/hashdir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    }
  ]
}

About

Generate a cryptographic view of a directory's contents

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages