pub fn directory(pathname: &str) -> String
obtain the directory portion of a pathname (via Path::parent) Matches Perl’s pathname_directory.
Path::parent