This crate is pretty great! ... Until you need to pass the path to File::open()...
Could we have a conversion function that convert any path back into an std PathBuf?
For my use case I did a quick hack that is good enough, but I'm not versed in all the filesystem pitfalls that can happen, so an actual proper function would be nice
use core::str::FromStr;
use std::path::PathBuf;
use typed_path::WindowsPath;
#[extend::ext]
pub impl WindowsPath {
fn to_std(&self) -> PathBuf {
PathBuf::from_str(self.to_str().unwrap()).unwrap()
}
}
This crate is pretty great! ... Until you need to pass the path to
File::open()...Could we have a conversion function that convert any path back into an std PathBuf?
For my use case I did a quick hack that is good enough, but I'm not versed in all the filesystem pitfalls that can happen, so an actual proper function would be nice