MUSIC PLAYERgit diff --cached src/window_likes/malvim.rs! and fixes

This commit is contained in:
stjet
2024-10-21 05:21:59 +00:00
parent 4a972783a8
commit decf1d3b82
13 changed files with 288 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
use std::fs::read_dir;
use std::path::PathBuf;
use bmp_rust::bmp::BMP;
@@ -49,3 +50,16 @@ pub fn get_bmp(path: &str) -> Vec<Vec<Vec<u8>>> {
bmp
}
pub fn get_all_files(dir: PathBuf) -> Vec<PathBuf> {
let mut files = Vec::new();
for entry in read_dir(dir).unwrap() {
let path = entry.unwrap().path();
if path.is_dir() {
files.extend(get_all_files(path));
} else {
files.push(path);
}
}
files
}