From a2a9a2ec68d2e4916d03aa0b7a4b24c4a78d0bc5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 16:48:09 +0100 Subject: [PATCH] feat: list contents of current directory --- Cargo.toml | 1 + src/main.rs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b7c9d31..0ef2e72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] +anyhow = "1.0" diff --git a/src/main.rs b/src/main.rs index e7a11a9..445927f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,11 @@ -fn main() { - println!("Hello, world!"); +fn main() -> anyhow::Result<()> { + println!("Forgejo TODO Checker!"); + + // list files in current directory to get a feel for what we have access to + std::fs::read_dir(".")? + .filter_map(Result::ok) + .map(|e| e.path()) + .for_each(|e| println!("{e:?}")); + + Ok(()) }