[−][src]Function fungus::sys::mash
pub fn mash<T: AsRef<Path>, U: AsRef<Path>>(dir: T, base: U) -> PathBuf
Returns a new owned PathBuf
from dir
mashed together with base
.
Differs from the mash
implementation as mash
drops root prefix of the given path
if
it exists and also drops any trailing '/' on the new resulting path. More closely aligns
with the Golang implementation of join.
Examples
use fungus::prelude::*; assert_eq!(sys::mash("/foo", "/bar"), PathBuf::from("/foo/bar"));