du
ドキュメントはこちらから入手できますが、Linux のコマンドと同じようにディレクトリ サイズを取得するための API がないことは衝撃的です。
https://www.backblaze.com/b2/docs
これにはファイル用のAPIがありますが、ディレクトリサイズ用のAPIはありません - 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
上記からこの結果が得られます-
{ accountId: '11111111',
action: 'folder',
bucketId: '44444444444',
contentLength: 0,
contentSha1: null,
contentType: null,
fileId: null,
fileInfo: {},
fileName: 'test/testinside/',
uploadTimestamp: 0 }