Function winsafe::path::has_extension

source ·
pub fn has_extension(full_path: &str, extensions: &[impl AsRef<str>]) -> bool
Available on crate feature kernel only.
Expand description

Tells whether the full path ends in one of the given extensions, case-insensitive.

§Examples

use winsafe::{self as w, prelude::*};

println!("{}",
    w::path::has_extension("file.txt", &[".txt", ".bat"]));