7

Documentation is available here but shocking is that there is no api to get the directory size same as du command does in linux.

https://www.backblaze.com/b2/docs

this has api for files but none for directory size - https://www.backblaze.com/b2/docs/files.html

await b2.authorize();
await b2.listFileNames(bucketid);
await b2.getFileInfo(fileId) // gets the file info but directory has null in id field 

we get this result from above -

 { accountId: '11111111',
       action: 'folder',
       bucketId: '44444444444',
       contentLength: 0,
       contentSha1: null,
       contentType: null,
       fileId: null,
       fileInfo: {},
       fileName: 'test/testinside/',
       uploadTimestamp: 0 }
Gabriel Devillers
  • 3,155
  • 2
  • 30
  • 53
Vishvendra Singh
  • 484
  • 5
  • 19

0 Answers0