add file size to FileEngine (#2323)

This commit is contained in:
Chris Rogus authored and GitHub committed 2024-06-10 20:48:36 -07:00
1 parent 9d55bfc1dc
commit d0f0548776
3 files changed
+18

No files matched your search

+5
View File
@@ -42,6 +42,11 @@ impl FileEngine for WebFileEngine {
.collect()
}
async fn file_size(&self, file: &str) -> Option<u64> {
let file = self.find(file)?;
Some(file.size() as u64)
}
// read a file to bytes
async fn read_file(&self, file: &str) -> Option<Vec<u8>> {
let file = self.find(file)?;