Is there any way to receive the total size of all the files in a folder?
Or do I have to loop through all the files and request and count their size?
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
-
Hi Max,
The "size" and "file_count" attributes are returned for each folder in get_account_tree. That should do the trick. -
-
Hi Jeremy, are the size and file_count attributes fully supported? I noticed they are not in the Folder object documentation. Also, the "file_count" doesn't seem to work right for the root folder - it always returns an empty string.
Can you confirm that bookmark items will never add to the "size" value, but web documents, files, or Google items will? That appears to be the case right now but I want to confirm.
Thanks!
Ben -
-
Hi Ben,
We need to update our docs with some new parameters and attributes, but if you run a test of get_account_tree, you'll see size and file_count in the output. I'll check on file_count, since that should be working now.
You're correct about bookmarks - those don't take any space. But all files, including webdocs and Google docs, take up space. -
-
Sounds good, thanks! I have used them and they seem to work correctly apart from the one issue with the root folder.
Mainly I just needed an easy way to know if a folder is totally empty (not counting links), so the size attribute should work nicely for this purpose.
Ben -
Loading Profile...


EMPLOYEE
