feat: add list files command

This commit is contained in:
DecDuck
2025-05-26 15:02:28 +10:00
parent 6b5356627a
commit 072a1584a0
2 changed files with 10 additions and 2 deletions

View File

@@ -110,3 +110,11 @@ pub fn has_backend_for_path(path: String) -> bool {
has_backend
}
#[napi]
pub fn list_files(path: String) -> Vec<String> {
let path = Path::new(&path);
let backend = create_backend_for_path(path).unwrap();
let files = backend.list_files(path);
files.into_iter().map(|e| e.relative_filename).collect()
}