diff options
author | zwPapEr <zw.paper@gmail.com> | 2019-11-02 15:42:42 +0800 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2020-01-11 14:17:44 +0530 |
commit | 0ebb39d60cc498cf92c09e8b3fa46316873941b6 (patch) | |
tree | 96fb9ce7d12402cc06937a3422fc798f04939bc6 /src/meta/mod.rs | |
parent | 87e87d87cdf91d7e8a3f385b0a5beb96ddbd8824 (diff) |
impl showing inode by setting blocks
working on https://github.com/Peltoche/lsd/issues/276
Diffstat (limited to 'src/meta/mod.rs')
-rw-r--r-- | src/meta/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/meta/mod.rs b/src/meta/mod.rs index 69bc34f..2ecc472 100644 --- a/src/meta/mod.rs +++ b/src/meta/mod.rs @@ -1,6 +1,7 @@ mod date; mod filetype; mod indicator; +mod inode; mod name; mod owner; mod permissions; @@ -13,6 +14,7 @@ mod windows_utils; pub use self::date::Date; pub use self::filetype::FileType; pub use self::indicator::Indicator; +pub use self::inode::INode; pub use self::name::Name; pub use self::owner::Owner; pub use self::permissions::Permissions; @@ -40,6 +42,7 @@ pub struct Meta { pub size: Size, pub symlink: SymLink, pub indicator: Indicator, + pub inode: INode, pub content: Option<Vec<Meta>>, } @@ -211,8 +214,10 @@ impl Meta { let file_type = FileType::new(&metadata, &permissions); let name = Name::new(&path, file_type); + let inode = INode::from(&metadata); Ok(Self { + inode, path: path.to_path_buf(), symlink: SymLink::from(path.as_path()), size: Size::from(&metadata), |