1
我的代码如下:获得文件大小
requestObj.addField(BoxFolder.FIELD_SIZE);
BoxCollection itemCollection = client.getFoldersManager().getFolderItems(file.getId(),
(BoxFolderRequestObject) requestObj);
List<BoxTypedObject> objects = itemCollection.getEntries();
for (BoxTypedObject innerFile : objects) {
System.out.println("=============" + innerFile.getExtraData(BoxFolder.FIELD_SIZE));
System.out.println("=============" + innerFile.getValue(BoxFolder.FIELD_SIZE));
}
这两个System.out的
我看着BoxTypedObject它没有办法返回返回null文件大小。
我看到的getSize()在BoxItem,但不是由Box.getFolderItems ---> BoxCollection ----> BoxTypedObject
返回请提供一种方式来获得文件盒大小
更多的上下文:
https://github.com/box/box-java-sdk-v2/issues/58