diff --git a/src/fs/metadata.rs b/src/fs/metadata.rs index 476524ee4..896d0b3e3 100644 --- a/src/fs/metadata.rs +++ b/src/fs/metadata.rs @@ -49,7 +49,6 @@ pub struct JoshutoMetadata { pub directory_size: Option, pub modified: time::SystemTime, pub accessed: time::SystemTime, - pub created: time::SystemTime, pub mode: Mode, pub file_type: FileType, pub link_type: LinkType, @@ -66,13 +65,12 @@ impl JoshutoMetadata { let symlink_metadata = fs::symlink_metadata(path)?; let metadata = fs::metadata(path); - let (len, modified, accessed, created) = match metadata.as_ref() { - Ok(m) => (m.len(), m.modified()?, m.accessed()?, m.created()?), + let (len, modified, accessed) = match metadata.as_ref() { + Ok(m) => (m.len(), m.modified()?, m.accessed()?), Err(_) => ( symlink_metadata.len(), symlink_metadata.modified()?, symlink_metadata.accessed()?, - symlink_metadata.created()?, ), }; @@ -125,7 +123,6 @@ impl JoshutoMetadata { directory_size, modified, accessed, - created, mode, file_type, link_type, @@ -156,10 +153,6 @@ impl JoshutoMetadata { self.accessed } - pub fn created(&self) -> time::SystemTime { - self.created - } - pub fn file_type(&self) -> FileType { self.file_type } diff --git a/src/types/option/line_mode/args.rs b/src/types/option/line_mode/args.rs index 1fd1a4b4e..312273568 100644 --- a/src/types/option/line_mode/args.rs +++ b/src/types/option/line_mode/args.rs @@ -3,7 +3,6 @@ pub enum LineModeArgs { Size, ModifyTime, AccessTime, - BirthTime, User, Group, Permission, @@ -17,7 +16,6 @@ impl AsRef for LineModeArgs { LineModeArgs::Size => "size", LineModeArgs::ModifyTime => "mtime", LineModeArgs::AccessTime => "atime", - LineModeArgs::BirthTime => "ctime", LineModeArgs::User => "user", LineModeArgs::Group => "group", LineModeArgs::Permission => "perm", diff --git a/src/types/option/line_mode/mod.rs b/src/types/option/line_mode/mod.rs index 871f2d0d9..e9fe85ee8 100644 --- a/src/types/option/line_mode/mod.rs +++ b/src/types/option/line_mode/mod.rs @@ -8,7 +8,7 @@ use crate::error::{AppError, AppErrorKind, AppResult}; #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct LineMode { - pub mode: [LineModeArgs; 8], + pub mode: [LineModeArgs; 7], pub size: usize, } @@ -19,7 +19,6 @@ impl LineMode { LineModeArgs::Size, LineModeArgs::ModifyTime, LineModeArgs::AccessTime, - LineModeArgs::BirthTime, LineModeArgs::User, LineModeArgs::Group, LineModeArgs::Permission, @@ -31,7 +30,7 @@ impl LineMode { pub const fn empty() -> Self { Self { - mode: [LineModeArgs::Null; 8], + mode: [LineModeArgs::Null; 7], size: 0, } } @@ -48,7 +47,7 @@ impl LineMode { impl Default for LineMode { fn default() -> Self { - let mut mode = [Default::default(); 8]; + let mut mode = [Default::default(); 7]; mode[0] = LineModeArgs::Size; Self { size: 1, mode } @@ -68,7 +67,6 @@ impl LineMode { "size" => line_mode.add_mode(LineModeArgs::Size), "mtime" => line_mode.add_mode(LineModeArgs::ModifyTime), "atime" => line_mode.add_mode(LineModeArgs::AccessTime), - "btime" => line_mode.add_mode(LineModeArgs::BirthTime), "user" => line_mode.add_mode(LineModeArgs::User), "group" => line_mode.add_mode(LineModeArgs::Group), "perm" => line_mode.add_mode(LineModeArgs::Permission), diff --git a/src/ui/widgets/tui_dirlist_detailed.rs b/src/ui/widgets/tui_dirlist_detailed.rs index f8c52586b..454548ee0 100644 --- a/src/ui/widgets/tui_dirlist_detailed.rs +++ b/src/ui/widgets/tui_dirlist_detailed.rs @@ -143,7 +143,6 @@ fn display_line_mode(mode: LineMode, entry: &JoshutoDirEntry) -> String { LineModeArgs::Size => get_entry_size_string(entry), LineModeArgs::ModifyTime => time_to_string(metadata.modified()), LineModeArgs::AccessTime => time_to_string(metadata.accessed()), - LineModeArgs::BirthTime => time_to_string(metadata.created()), LineModeArgs::User => unix::uid_to_string(metadata.uid).unwrap_or("unknown".into()), LineModeArgs::Group => unix::gid_to_string(metadata.gid).unwrap_or("unknown".into()), LineModeArgs::Permission => unix::mode_to_char_array(metadata.mode, metadata.file_type) diff --git a/src/utils/serde.rs b/src/utils/serde.rs index e6a0a6c4e..f1f2040d3 100644 --- a/src/utils/serde.rs +++ b/src/utils/serde.rs @@ -31,7 +31,6 @@ where "size" => line_mode.add_mode(LineModeArgs::Size), "mtime" => line_mode.add_mode(LineModeArgs::ModifyTime), "atime" => line_mode.add_mode(LineModeArgs::AccessTime), - "btime" => line_mode.add_mode(LineModeArgs::BirthTime), "user" => line_mode.add_mode(LineModeArgs::User), "group" => line_mode.add_mode(LineModeArgs::Group), "perm" => line_mode.add_mode(LineModeArgs::Permission),