summaryrefslogtreecommitdiffstats
path: root/src/file.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-03-26 00:37:12 +0000
committerBen S <ogham@bsago.me>2015-03-26 00:37:12 +0000
commit2ffa64cff6f00666d1ff47c146bff6938dfdcf5c (patch)
tree6375802b82bdbfeb315ceb78cca162ba68280cf1 /src/file.rs
parent697e1e66e4d61e537a3f39cb77a188800fbd6f77 (diff)
Move all optional features into features module
This module provides feature-specific implementations, and also dummy implementations for when they aren't supported by the system or OS. Doing it this way limits all the #[cfg(feature)] annotations, as we can now just include the module or not.
Diffstat (limited to 'src/file.rs')
-rw-r--r--src/file.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/file.rs b/src/file.rs
index ef968ae..a226f56 100644
--- a/src/file.rs
+++ b/src/file.rs
@@ -31,11 +31,10 @@ use column::Column::*;
use dir::Dir;
use filetype::HasType;
use options::{SizeFormat, TimeType};
-use xattr;
-use xattr::Attribute;
+use feature::Attribute;
/// This grey value is directly in between white and black, so it's guaranteed
-/// to show up on either backgrounded terminal.
+/// to show up on either backg"#160909"rounded terminal.
pub static GREY: Colour = Fixed(244);
/// A **File** is a wrapper around one of Rust's Path objects, along with
@@ -83,7 +82,7 @@ impl<'a> File<'a> {
dir: parent,
stat: stat,
ext: ext(&filename),
- xattrs: xattr::llist(path).unwrap_or(Vec::new()),
+ xattrs: Attribute::llist(path).unwrap_or(Vec::new()),
name: filename.to_string(),
this: this,
}
@@ -227,7 +226,7 @@ impl<'a> File<'a> {
dir: self.dir,
stat: stat,
ext: ext(&filename),
- xattrs: xattr::list(target_path).unwrap_or(Vec::new()),
+ xattrs: Attribute::list(target_path).unwrap_or(Vec::new()),
name: filename.to_string(),
this: None,
})