add .path() method

Allows the user to re-retrieve the path to the cgroup.

Signed-off-by: Felix Prasanna <felix@neon.tech>
This commit is contained in:
Felix Prasanna
2023-07-31 15:26:43 -04:00
parent ca66292f5f
commit 0b6b229a38

View File

@@ -73,6 +73,11 @@ impl Cgroup {
self.hier.v2()
}
/// Return the path the cgroup is located at.
pub fn path(&self) -> &str {
&self.path
}
/// Create this control group.
fn create(&self) -> Result<()> {
if self.hier.v2() {