From 3413b7d8476fa6d6e9a4c96a04506df0c00543bb Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Fri, 12 Oct 2018 12:22:43 -0400 Subject: [PATCH] Expose the path of controllers for chown --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 03a3739..1d00503 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,6 +169,9 @@ pub trait Controller { #[doc(hidden)] fn control_type(&self) -> Controllers; + /// The file system path to the controller. + fn path(&self) -> &Path; + /// Apply a set of resources to the Controller, invoking its internal functions to pass the /// kernel the information. fn apply(&self, res: &Resources) -> Result<()>; @@ -194,6 +197,10 @@ impl Controller for T where T: ControllerInternal { ControllerInternal::control_type(self) } + fn path(&self) -> &Path { + self.get_path() + } + /// Apply a set of resources to the Controller, invoking its internal functions to pass the /// kernel the information. fn apply(&self, res: &Resources) -> Result<()> {