summaryrefslogtreecommitdiffstats
path: root/src/dir.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-09-03 18:48:53 +0100
committerBen S <ogham@bsago.me>2015-09-03 18:48:53 +0100
commit10fecbd7f6d8b73c2df6d01d049ef4578f934df5 (patch)
tree6426977f40ce7111497f334cbefe0d75434a1a05 /src/dir.rs
parenta14f1d82f07e7f0b19a696d32183470d51aef356 (diff)
Details view comments and tidy-ups
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dir.rs b/src/dir.rs
index 4126656..78e0ed6 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -14,8 +14,15 @@ use file::{File, fields};
/// check the existence of surrounding files, then highlight themselves
/// accordingly. (See `File#get_source_files`)
pub struct Dir {
+
+ /// A vector of the files that have been read from this directory.
contents: Vec<PathBuf>,
+
+ /// The path that was read.
pub path: PathBuf,
+
+ /// Holds a `Git` object if scanning for Git repositories is switched on,
+ /// and this directory happens to contain one.
git: Option<Git>,
}
@@ -71,6 +78,7 @@ impl Dir {
}
+/// Iterator over reading the contents of a directory as `File` objects.
pub struct Files<'dir> {
inner: SliceIter<'dir, PathBuf>,
dir: &'dir Dir,