kplayer-rust-wrap 1.0.0

libkplayer plugin wrap for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[allow(dead_code)]
extern "C" {
    fn FileExist(p: i32) -> i32;
}

#[allow(dead_code)]
pub fn file_exist(file_path: String) -> bool {
    let str_i = super::string::DynamicString::from(file_path.as_bytes()).get_index();
    unsafe {
        if FileExist(str_i) == 0 {
            return false;
        }
    }
    true
}