This commit is contained in:
Alvin-Zilverstand committed 2026-11-19 21:30:58 +01:00
1 parent e9c5ed9a4c
commit fc8e56da41
5 files changed
-5219

No files matched your search

-5165
View File
File diff suppressed because it is too large. Load diff
-11
View File
@@ -1,11 +0,0 @@
[package]
name = "native_media_viewer"
version = "0.1.0"
edition = "2024"
[dependencies]
anyhow = "1.0.104"
eframe = "0.37.0"
egui_extras = "0.37.0"
image = "0.25.10"
rfd = "0.18.0"
-3
View File
@@ -1,3 +0,0 @@
fn main() {
println!("Hello, world!");
}
-34
View File
@@ -1,34 +0,0 @@
use std::fs;
use std::path::Path;
use serde::Serialize;
use anyhow::Result;
#[derive(Serialize, Clone, Debug)]
pub struct FileInfo {
pub name: String,
pub path: String,
pub is_dir: bool,
pub extension: Option<String>,
}
pub fn list_files(dir_path: &str) -> Result<Vec<FileInfo>> {
let path = Path::new(dir_path);
let mut files = Vec::new();
if path.is_dir() {
for entry in fs::read_dir(path)? {
let entry = entry?;
let metadata = entry.metadata()?;
let file_name = entry.file_name().to_string_lossy().into_owned();
let file_path = entry.path().to_string_lossy().into_owned();
files.push(FileInfo {
name: file_name,
path: file_path,
is_dir: metadata.is_dir(),
extension: entry.path().extension().map(|s| s.to_string_lossy().into_owned()),
});
}
}
Ok(files)
}
-6
View File
@@ -1,6 +0,0 @@
{
"name": "image",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}