diff options
author | Katharina Fey <kookie@spacekookie.de> | 2018-09-16 10:26:38 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2018-09-16 10:26:38 +0100 |
commit | b257bdaefe633ebb72590aac2b7f504af51ba23e (patch) | |
tree | 2430f73bd2d3243b6670015cf535049902546051 /lockchain-files/examples/create.rs | |
parent | a0f9a5bb2a294674a28fc8ad38deb11d9bf9ecb1 (diff) |
Adding primitive file utilities
Diffstat (limited to 'lockchain-files/examples/create.rs')
-rw-r--r-- | lockchain-files/examples/create.rs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/lockchain-files/examples/create.rs b/lockchain-files/examples/create.rs index 67279a9..27d4ff9 100644 --- a/lockchain-files/examples/create.rs +++ b/lockchain-files/examples/create.rs @@ -8,18 +8,19 @@ use lcc::{EncryptedBody, Generator, Payload, Record, VaultType}; use std::env; fn main() { - if env::args().len() == 3 { - let path = env::args().nth(1).unwrap(); - let name = env::args().nth(2).unwrap(); - - let mut vault: FileVault<EncryptedBody> = Generator::new() - .path(name, path) - .user_type(VaultType::SoloUser { - username: "spacekookie".into(), - secret: "foobar3264".into(), - }).finalise() - .unwrap(); - vault.sync(); + + // if env::args().len() == 3 { + // let path = env::args().nth(1).unwrap(); + // let name = env::args().nth(2).unwrap(); + + // let mut vault: FileVault<EncryptedBody> = Generator::new() + // .path(name, path) + // .user_type(VaultType::SoloUser { + // username: "spacekookie".into(), + // secret: "foobar3264".into(), + // }).finalise() + // .unwrap(); + // vault.sync(); // let vault: FileVault<EncryptedBody> = FileVault::new(&name, &path); @@ -40,7 +41,7 @@ fn main() { // vault.meta_push_domain(users); // vault.meta_push_domain(registry); // vault.sync(); - } else { - eprintln!("Usage: create <path> <name> [FLAGS] (there are no flags)") - } + // } else { + // eprintln!("Usage: create <path> <name> [FLAGS] (there are no flags)") + // } } |