mirror of
https://github.com/YGGverse/nexy.git
synced 2026-04-01 09:45:29 +00:00
update ns semantics
This commit is contained in:
parent
55dfc38491
commit
a238d0cd44
3 changed files with 57 additions and 51 deletions
|
|
@ -1,20 +0,0 @@
|
|||
pub struct Time {
|
||||
pub is_accessed: bool,
|
||||
pub is_created: bool,
|
||||
pub is_modified: bool,
|
||||
}
|
||||
|
||||
pub struct Dir {
|
||||
pub time: Time,
|
||||
pub is_count: bool,
|
||||
}
|
||||
pub struct File {
|
||||
pub time: Time,
|
||||
pub is_size: bool,
|
||||
}
|
||||
|
||||
pub struct List {
|
||||
pub dir: Dir,
|
||||
pub file: File,
|
||||
pub time_format: String,
|
||||
}
|
||||
44
src/session/storage/list_config.rs
Normal file
44
src/session/storage/list_config.rs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
pub struct Time {
|
||||
pub is_accessed: bool,
|
||||
pub is_created: bool,
|
||||
pub is_modified: bool,
|
||||
}
|
||||
|
||||
pub struct Dir {
|
||||
pub time: Time,
|
||||
pub is_count: bool,
|
||||
}
|
||||
pub struct File {
|
||||
pub time: Time,
|
||||
pub is_size: bool,
|
||||
}
|
||||
|
||||
pub struct ListConfig {
|
||||
pub dir: Dir,
|
||||
pub file: File,
|
||||
pub time_format: String,
|
||||
}
|
||||
|
||||
impl ListConfig {
|
||||
pub fn init(config: &crate::config::Config) -> Self {
|
||||
Self {
|
||||
dir: Dir {
|
||||
time: Time {
|
||||
is_accessed: config.list_dir_accessed,
|
||||
is_created: config.list_dir_created,
|
||||
is_modified: config.list_dir_modified,
|
||||
},
|
||||
is_count: config.list_dir_count,
|
||||
},
|
||||
file: File {
|
||||
time: Time {
|
||||
is_accessed: config.list_file_accessed,
|
||||
is_created: config.list_file_created,
|
||||
is_modified: config.list_file_modified,
|
||||
},
|
||||
is_size: config.list_file_size,
|
||||
},
|
||||
time_format: config.list_time_format.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue