Steps to reproduce:
SDK v2-rev25-1.12.0
API
of Google Drive
List<File>
File.getFileSize()
0
or something > 0
getFileSize
on GoogleDocs
Files stored in the Google Drive produce a NullPointerException
File size on google native documents have no real meaning for the end user, because he will never download a file having the native format of google docs. You may have an idea of the space occupied on the user's drive using the quotaBytesUsed property of File.
By the way, are you sure you get a NPE when you call file.getFileSize() or when you use the result of this invokation in other method ? Because such a call should return null
but should not throw an Exception
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.