(source_file_directory: &String)
| 15 | } |
| 16 | |
| 17 | pub fn get_video_files(source_file_directory: &String) -> Vec<String> { |
| 18 | let locale = if !source_file_directory.is_empty() { |
| 19 | source_file_directory.as_str() |
| 20 | } else if is_dev() { |
| 21 | "../" |
| 22 | } else { |
| 23 | "." |
| 24 | }; |
| 25 | |
| 26 | let paths = fs::read_dir(locale).unwrap(); |
| 27 | return paths |
| 28 | .filter_map(|e| e.ok()) |
| 29 | .filter(|p| p.file_type().unwrap().is_file()) |
| 30 | .map(|p| p.file_name().to_str().unwrap().to_string()) |
| 31 | .collect::<Vec<String>>(); |
| 32 | } |
| 33 | |
| 34 | pub fn are_all_source_files_present(source_file_directory: &String) -> bool { |
| 35 | let existing_video_files = get_video_files(source_file_directory); |
no test coverage detected