|
@@ -137,6 +137,7 @@ use options::{FileFilter, RecurseOptions};
|
|
|
use output::colours::Colours;
|
|
use output::colours::Colours;
|
|
|
use output::column::{Alignment, Column, Columns, SizeFormat};
|
|
use output::column::{Alignment, Column, Columns, SizeFormat};
|
|
|
use output::cell::{TextCell, DisplayWidth};
|
|
use output::cell::{TextCell, DisplayWidth};
|
|
|
|
|
+use output::tree::TreePart;
|
|
|
use super::filename;
|
|
use super::filename;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -744,34 +745,6 @@ impl<U> Table<U> where U: Users {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-#[derive(PartialEq, Debug, Clone)]
|
|
|
|
|
-enum TreePart {
|
|
|
|
|
-
|
|
|
|
|
- /// Rightmost column, *not* the last in the directory.
|
|
|
|
|
- Edge,
|
|
|
|
|
-
|
|
|
|
|
- /// Not the rightmost column, and the directory has not finished yet.
|
|
|
|
|
- Line,
|
|
|
|
|
-
|
|
|
|
|
- /// Rightmost column, and the last in the directory.
|
|
|
|
|
- Corner,
|
|
|
|
|
-
|
|
|
|
|
- /// Not the rightmost column, and the directory *has* finished.
|
|
|
|
|
- Blank,
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-impl TreePart {
|
|
|
|
|
- fn ascii_art(&self) -> &'static str {
|
|
|
|
|
- match *self {
|
|
|
|
|
- TreePart::Edge => "├──",
|
|
|
|
|
- TreePart::Line => "│ ",
|
|
|
|
|
- TreePart::Corner => "└──",
|
|
|
|
|
- TreePart::Blank => " ",
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
lazy_static! {
|
|
lazy_static! {
|
|
|
static ref DATE_AND_TIME: DateFormat<'static> =
|
|
static ref DATE_AND_TIME: DateFormat<'static> =
|
|
|
DateFormat::parse("{2>:D} {:M} {2>:h}:{02>:m}").unwrap();
|
|
DateFormat::parse("{2>:D} {:M} {2>:h}:{02>:m}").unwrap();
|