diff options
author | Ben S <ogham@bsago.me> | 2015-01-26 17:26:11 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-01-26 17:26:11 +0000 |
commit | e835fe8fe352751e6ca03c1edf31705c3abe61f4 (patch) | |
tree | 5ca10acec65ec9251168a4335d8396b2a369e64a /src/dir.rs | |
parent | da9d1f77d9bb1f63163484ee2205a4b263465ea8 (diff) |
Make all fields of Dir private
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -8,8 +8,8 @@ use file::File; /// check the existence of surrounding files, then highlight themselves /// accordingly. (See `File#get_source_files`) pub struct Dir { - pub contents: Vec<Path>, - pub path: Path, + contents: Vec<Path>, + path: Path, } impl Dir { @@ -42,4 +42,9 @@ impl Dir { pub fn contains(&self, path: &Path) -> bool { self.contents.contains(path) } + + /// Append a path onto the path specified by this directory. + pub fn join(&self, child: Path) -> Path { + self.path.join(child) + } } |