aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukeflo2025-05-25 21:51:06 +0200
committerlukeflo2025-05-25 21:51:06 +0200
commiteac547bce389169b867ccdeedc47ba2b8b90511d (patch)
tree35ed604211aa4d3897a78f12f27f353a129c1431
parent06782b5ed1527b1d4eb6e26feb5a260415efe1af (diff)
downloadbibiman-eac547bce389169b867ccdeedc47ba2b8b90511d.tar.gz
bibiman-eac547bce389169b867ccdeedc47ba2b8b90511d.zip
remove unneeded function
-rw-r--r--src/bibiman/bibisetup.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/bibiman/bibisetup.rs b/src/bibiman/bibisetup.rs
index 0914f7c..92e02fc 100644
--- a/src/bibiman/bibisetup.rs
+++ b/src/bibiman/bibisetup.rs
@@ -455,37 +455,6 @@ impl BibiSetup {
}
}
-/// This function walks the given dir and collects all pdf files into a `Vec`
-pub fn collect_pdf_files(pdf_dir: &PathBuf) -> Option<Vec<PathBuf>> {
- let mut files: Vec<PathBuf> = Vec::new();
-
- // Expand tilde to /home/user
- let pdf_dir = if pdf_dir.starts_with("~") {
- &app::expand_home(&pdf_dir)
- } else {
- pdf_dir
- };
-
- // Walk the passed dir and collect all pdf files into vec
- if pdf_dir.is_dir() {
- for file in WalkDir::new(pdf_dir) {
- let f = file.unwrap().into_path();
- if f.is_file()
- && f.extension().is_some()
- && f.extension().unwrap_or_default().to_ascii_lowercase() == "pdf"
- {
- files.push(f);
- }
- }
- }
-
- if files.is_empty() {
- None
- } else {
- Some(files)
- }
-}
-
/// This function walks the given dir and collects all pdf files into a `HashMap`
/// of the format `[String, Vec<PathBuf>]`, where `String` represents the basename
/// of the file and the `Vec<PathBuf>` holds all filepaths ending with this basename.