Skip to content

Commit

Permalink
add .path() method
Browse files Browse the repository at this point in the history
Allows the user to re-retrieve the path to the cgroup.

Signed-off-by: Felix Prasanna <felix@neon.tech>
  • Loading branch information
fprasx committed Aug 1, 2023
1 parent ca66292 commit 0b6b229
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cgroup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 0b6b229

Please sign in to comment.