pub fn root_dir_common_filter(path: &Path) -> bool
Expand description
Common filters when finding the root directory of a Zip archive.
This filter is a sensible default for most use cases and filters out common system files that are usually irrelevant to the contents of the archive.
Currently, the filter ignores:
/__MACOSX/
/.DS_Store
/Thumbs.db
This function is not guaranteed to be stable and may change in future versions.
ยงExample
assert!(zip::read::root_dir_common_filter(Path::new("foo.txt")));
assert!(!zip::read::root_dir_common_filter(Path::new(".DS_Store")));
assert!(!zip::read::root_dir_common_filter(Path::new("Thumbs.db")));
assert!(!zip::read::root_dir_common_filter(Path::new("__MACOSX")));
assert!(!zip::read::root_dir_common_filter(Path::new("__MACOSX/foo.txt")));