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

Method new

python-alpm/src/types/path.rs:15–18  ·  view source on GitHub ↗
(path: PathBuf)

Source from the content-addressed store, hash-verified

13 // PyO3 handles the conversion from Rust's `std::path::PathBuf` to Python's `pathlib.Path`.
14 #[new]
15 fn new(path: PathBuf) -> Result<Self, crate::types::Error> {
16 let inner = alpm_types::RelativeFilePath::new(path)?;
17 Ok(inner.into())
18 }
19
20 fn __str__(&self) -> String {
21 self.0.to_string()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected