Function winsafe::path::get_path

source ·
pub fn get_path(full_path: &str) -> Option<&str>
Available on crate feature kernel only.
Expand description

Extracts the full path, but the last part.

§Examples

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

let p = w::path::get_path("C:\\Temp\\xx\\a.txt"); // C:\Temp\xx
let q = w::path::get_path("C:\\Temp\\xx\\");      // C:\Temp\xx
let r = w::path::get_path("C:\\Temp\\xx");        // C:\Temp"