Skip to content

Commit 3413b7d

Browse files
tecywiz121levex
authored andcommitted
Expose the path of controllers for chown
1 parent 3b9d4a8 commit 3413b7d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ pub trait Controller {
169169
#[doc(hidden)]
170170
fn control_type(&self) -> Controllers;
171171

172+
/// The file system path to the controller.
173+
fn path(&self) -> &Path;
174+
172175
/// Apply a set of resources to the Controller, invoking its internal functions to pass the
173176
/// kernel the information.
174177
fn apply(&self, res: &Resources) -> Result<()>;
@@ -194,6 +197,10 @@ impl<T> Controller for T where T: ControllerInternal {
194197
ControllerInternal::control_type(self)
195198
}
196199

200+
fn path(&self) -> &Path {
201+
self.get_path()
202+
}
203+
197204
/// Apply a set of resources to the Controller, invoking its internal functions to pass the
198205
/// kernel the information.
199206
fn apply(&self, res: &Resources) -> Result<()> {

0 commit comments

Comments
 (0)