remozipsy 0.0.1

zip implementation independent structs and helpers
Documentation
1
2
3
4
5
6
7
8
9
10
use std::path::Path;

pub fn calculate_local_unix_path(root: &Path, path: &Path) -> Option<String> {
    let local_unix_path = path.strip_prefix(root).ok()?.to_str()?;

    #[cfg(windows)]
    let local_unix_path = local_unix_path.replace(r#"\"#, "/");

    Some(local_unix_path.to_string())
}