From 0b6b229a389e9a43437ee8f0fc906a5d514cb5c2 Mon Sep 17 00:00:00 2001 From: Felix Prasanna Date: Mon, 31 Jul 2023 15:26:43 -0400 Subject: [PATCH] add .path() method Allows the user to re-retrieve the path to the cgroup. Signed-off-by: Felix Prasanna --- src/cgroup.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cgroup.rs b/src/cgroup.rs index 988d9e1..a73ec89 100644 --- a/src/cgroup.rs +++ b/src/cgroup.rs @@ -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() {