fix:#38 implement the basic storage functions of bucketmeta config use s3s struct define

This commit is contained in:
weisd
2024-10-14 14:58:32 +08:00
parent 0f39887cdb
commit 12114dce16
40 changed files with 920 additions and 1234 deletions
+1 -1
View File
@@ -485,7 +485,7 @@ impl LocalDisk {
async fn write_all_public(&self, volume: &str, path: &str, data: Vec<u8>) -> Result<()> {
if volume == super::RUSTFS_META_BUCKET && path == super::FORMAT_CONFIG_FILE {
let mut format_info = self.format_info.write().await;
format_info.data = data.clone();
format_info.data.clone_from(&data);
}
let volume_dir = self.get_bucket_path(volume)?;
+1 -1
View File
@@ -222,7 +222,7 @@ impl MetaCacheEntry {
Ok(wr)
}
pub fn is_dir(&self) -> bool {
self.metadata.is_empty() && self.name.ends_with("/")
self.metadata.is_empty() && self.name.ends_with('/')
}
pub fn is_object(&self) -> bool {
!self.metadata.is_empty()