create folder but does not work yet

This commit is contained in:
2026-01-01 21:58:42 +01:00
parent 636444536b
commit 6cb5af9845
3 changed files with 43 additions and 21 deletions
+20
View File
@@ -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)
}
}