MCPcopy Create free account
hub / github.com/archlinux/alpm / new

Method new

alpm-types/src/path.rs:49–54  ·  view source on GitHub ↗

Create a new `AbsolutePath`

(path: PathBuf)

Source from the content-addressed store, hash-verified

47
48impl AbsolutePath {
49 /// Create a new `AbsolutePath`
50 pub fn new(path: PathBuf) -> Result<AbsolutePath, Error> {
51 match path.is_absolute() {
52 true => Ok(AbsolutePath(path)),
53 false => Err(Error::PathNotAbsolute(path)),
54 }
55 }
56
57 /// Return a reference to the inner type

Callers

nothing calls this directly

Calls 3

AbsolutePathClass · 0.85
RelativePathClass · 0.85
RelativeFilePathClass · 0.70

Tested by

no test coverage detected