mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-09-28 05:09:01 +00:00
Move dummy xattr Attribute implementation into its own module.
This commit is contained in:
parent
6155252ac8
commit
a0105b951d
@ -6,39 +6,8 @@
|
||||
#[cfg(target_os = "linux")] mod xattr_linux;
|
||||
#[cfg(target_os = "linux")] pub use self::xattr_linux::Attribute;
|
||||
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))] use std::old_io as io;
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
|
||||
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Attribute;
|
||||
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
|
||||
impl Attribute {
|
||||
|
||||
/// Getter for name
|
||||
pub fn name(&self) -> &str {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Getter for size
|
||||
pub fn size(&self) -> usize {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Lists the extended attributes. Follows symlinks like `metadata`
|
||||
pub fn list(_: &Path) -> io::IoResult<Vec<Attribute>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
/// Lists the extended attributes. Does not follow symlinks like `symlink_metadata`
|
||||
pub fn llist(_: &Path) -> io::IoResult<Vec<Attribute>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
pub fn feature_implemented() -> bool { false }
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))] mod xattr_dummy;
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))] pub use self::xattr_dummy::Attribute;
|
||||
|
||||
// Git support
|
||||
|
||||
|
32
src/feature/xattr_dummy.rs
Normal file
32
src/feature/xattr_dummy.rs
Normal file
@ -0,0 +1,32 @@
|
||||
use std::io;
|
||||
use std::path::Path;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Attribute;
|
||||
|
||||
impl Attribute {
|
||||
|
||||
/// Getter for name
|
||||
pub fn name(&self) -> &str {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Getter for size
|
||||
pub fn size(&self) -> usize {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Lists the extended attributes. Follows symlinks like `metadata`
|
||||
pub fn list(_: &Path) -> io::Result<Vec<Attribute>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
/// Lists the extended attributes. Does not follow symlinks like `symlink_metadata`
|
||||
pub fn llist(_: &Path) -> io::Result<Vec<Attribute>> {
|
||||
Ok(Vec::new())
|
||||
}
|
||||
|
||||
pub fn feature_implemented() -> bool { false }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user