init metacache io

This commit is contained in:
weisd
2024-12-05 17:40:55 +08:00
parent b38c181992
commit ed0966cca3
10 changed files with 330 additions and 33 deletions
+10 -2
View File
@@ -1291,10 +1291,18 @@ impl DiskAPI for LocalDisk {
Ok(entries)
}
// TODO: io.writer
async fn walk_dir(&self, opts: WalkDirOptions) -> Result<Vec<MetaCacheEntry>> {
// FIXME: TODO: io.writer
async fn walk_dir(&self, opts: WalkDirOptions, wr: crate::io::Writer) -> Result<Vec<MetaCacheEntry>> {
// warn!("walk_dir opts {:?}", &opts);
let volume_dir = self.get_bucket_path(&opts.bucket)?;
if !skip_access_checks(&opts.bucket) {
if let Err(e) = access(&volume_dir).await {
return Err(convert_access_error(e, DiskError::VolumeAccessDenied));
}
}
let mut metas = Vec::new();
if opts.base_dir.ends_with(SLASH_SEPARATOR) {