aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: f30f834bc203c066cf0cd9a254371e9c46493213 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use walkdir::WalkDir;

/// Создание списка "events.xml" файлов.
fn get_list(root: &str) -> Vec<String> {
    let mut array: Vec<String> = vec![];

    for entry in WalkDir::new(root) {
        let path = entry.unwrap().path().display().to_string();

        if path.contains("events.xml") {
            array.push(path);
        }
    }

    return array;
}

fn main() {
    let root = "tests";
    let list = get_list(root);
    dbg!(list);
}