Expose the path of controllers for chown

This commit is contained in:
Sam Wilson
2018-10-12 12:22:43 -04:00
committed by Levente Kurusa
parent 3b9d4a8c2a
commit 3413b7d847

View File

@@ -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<T> 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<()> {