pub fn path_fn<F>(f: F) -> impl Functionwhere
    F: Fn(&Path) -> Option<OsString>,