MCPcopy Create free account
hub / github.com/Proryanator/encoder-benchmark / get_video_files

Function get_video_files

cli/src/cli_util.rs:17–32  ·  view source on GitHub ↗
(source_file_directory: &String)

Source from the content-addressed store, hash-verified

15}
16
17pub 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
34pub fn are_all_source_files_present(source_file_directory: &String) -> bool {
35 let existing_video_files = get_video_files(source_file_directory);

Callers 1

Calls 3

is_devFunction · 0.85
is_emptyMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected