remozipsy 0.0.2

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

// helper function that can be used if you want to build your own
// [`crate::FileSystem`]
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())
}