fix(vfs): Z-04 — implement webdav quota report

This commit is contained in:
2026-09-19 09:52:56 +02:00
parent 487f999a24
commit 17908a64fe
5 changed files with 187 additions and 3 deletions
+16
View File
@@ -885,6 +885,22 @@ impl DavFileSystem for CarrierFs {
Ok(())
})
}
fn get_quota(&self) -> FsFuture<'_, (u64, Option<u64>)> {
Box::pin(async move {
self.touch();
let inner = self.inner.lock().unwrap_or_else(|e| e.into_inner());
let total_capacity = inner.manifest.total_blocks as u64 * crate::crypto::CHUNK_SIZE as u64;
let used_bytes = inner
.manifest
.inodes
.values()
.filter(|i| !i.is_dir)
.map(|i| i.size)
.sum::<u64>();
Ok((used_bytes, Some(total_capacity)))
})
}
}
/// Datei-Handle für Dateien innerhalb des Carrier-Dateisystems mit Streaming und Chunk-Pufferung.