We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d36e3 commit 1606574Copy full SHA for 1606574
src/bin/cli.rs
@@ -56,6 +56,7 @@ enum Commands {
56
LogSize,
57
CachePath,
58
DataDir,
59
+ ListFiles,
60
}
61
62
fn main() -> Result<()> {
@@ -290,6 +291,21 @@ fn main() -> Result<()> {
290
291
dir.push(".zeta_crypto");
292
println!("{}", dir.display());
293
294
+ Commands::ListFiles => {
295
+ use std::fs;
296
+
297
+ let mut dir = dirs::home_dir().unwrap_or_else(|| std::path::PathBuf::from("."));
298
+ dir.push(".zeta_crypto");
299
300
+ match fs::read_dir(&dir) {
301
+ Ok(entries) => {
302
+ for entry in entries.flatten() {
303
+ println!("{}", entry.path().display());
304
+ }
305
306
+ Err(_) => println!("Directory not found: {}", dir.display()),
307
308
309
310
311
Ok(())
0 commit comments