diff options
| author | Mel <einebeere@gmail.com> | 2021-10-05 19:06:01 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-10-05 19:06:01 +0200 |
| commit | fad317349557bee1055d81d7444f99619247815c (patch) | |
| tree | 50d9e081fcdab32b02daed8d23fa41e8eacd1d83 /cli/src | |
| parent | ad153a44d383962ac8021c02023a92b4c987fd54 (diff) | |
| download | ka-fad317349557bee1055d81d7444f99619247815c.tar.zst ka-fad317349557bee1055d81d7444f99619247815c.zip | |
Fs asserts and Create action tests.
Diffstat (limited to 'cli/src')
| -rw-r--r-- | cli/src/main.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs index d140d97..6504366 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,4 +1,4 @@ -use std::env; +use std::{env, time::SystemTime}; use ka::{ actions::{create, shift, update, ActionOptions}, @@ -14,12 +14,17 @@ fn main() { let filesystem = FsImpl {}; + let timestamp = SystemTime::now() + .duration_since(SystemTime::UNIX_EPOCH) + .expect("Could not get current system time.") + .as_secs(); + match command { "create" => { - create(options, &filesystem).expect("Failed executing Create action."); + create(options, &filesystem, timestamp).expect("Failed executing Create action."); } "update" => { - update(options, &filesystem).expect("Failed executing Update action."); + update(options, &filesystem, timestamp).expect("Failed executing Update action."); } "shift" => { let new_cursor: usize = args[2].as_str().parse().expect("Invalid cursor."); |
