[−][src]Function librelic::prelude::sys::mash
pub fn mash<T, U>(dir: T, base: U) -> PathBuf where
T: AsRef<Path>,
U: AsRef<Path>,
Returns a new owned PathBuf
from dir
mashed together with base
.
Differs from the join
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"));