From 407e61976b8caa8e22eaccba3c72fe9b8e8a44b4 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 10 Dec 2022 22:31:02 -0800 Subject: [PATCH] docs: Actually added basic docs. Will be update, I swear --- src/file_operations.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/file_operations.rs b/src/file_operations.rs index e98444f..f2bfa01 100644 --- a/src/file_operations.rs +++ b/src/file_operations.rs @@ -4,6 +4,20 @@ use scan_dir::ScanDir; const SUPPORTED_FILETYPES: [&str; 1] = ["mp3"]; +/// Recursivly scans the given root directory for files +/// WIP Function! All it does is print the directories +/// +/// # Examples +/// +/// ```rust +/// scan_music_dir("/home/Documents/RustedBeats"); +/// +///>>> "I found a directory src at .../src" +///>>> "I found a directory debug at .../debug" +///>>> "I found a file Cargo.toml at .../Cargo.toml" +///... +/// ``` +/// pub fn scan_music_dir(root: String) -> Result<(), ()> { let mut directories = Vec::::new(); directories.push(root.into());