create folder but does not work yet
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#[derive(Debug)]
|
||||
pub struct S3Item {
|
||||
pub key: String,
|
||||
pub is_folder: bool,
|
||||
pub folder_name: Option<String>,
|
||||
pub size: Option<i64>,
|
||||
pub last_modified: Option<String>,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for S3Item {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let item_type = if self.is_folder { "[MAPPA]" } else { "[FÁJL]" };
|
||||
let size_str = if let Some(size) = self.size {
|
||||
format!("{} bytes", size)
|
||||
} else {
|
||||
"-".to_string()
|
||||
};
|
||||
write!(f, "{} {} (méret: {})", item_type, self.key, size_str)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user