cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Get summer ready with Dropbox basic - travel documents, plans, progress reminders and more, right over here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get the folder Size & Date

Get the folder Size & Date

buttflattery
Explorer | Level 4

I am working on a PHP (Yii2) extension that uses DirectoryInterface and we can configure multiple adapters for that interface and DropboxAdapter is one of them i am working on. 

I need to get the size of the folder using the API , i was looking into the Dropbox API Explorer and couldnt find any thing relative to the folder size. The `get_metadata()` does not have the size property in it for folders but files only. Same goes for the folder Modified or creation date.

Is it only me who cant find it or it does not exist at all which will be ODD to know. 

1 Accepted Solution

Accepted Solutions

Re: Get the folder Size & Date

Greg-DB
Dropboxer

The Dropbox API doesn't return the total size or created/modified date for folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

View solution in original post

2 Replies 2

Re: Get the folder Size & Date

Greg-DB
Dropboxer

The Dropbox API doesn't return the total size or created/modified date for folders, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

Re: Get the folder Size & Date

buttflattery
Explorer | Level 4

Well, that is odd/shame for a filehosting service API to not return the folder size/modified date. Also i am not sure if the request you will forward will be accepted as this feature request has been in the queue for more than 6 Years now , see here https://github.com/BenExile/Dropbox/issues/61

So currently we are left with iterating the files inside the folder and calculating their size to show the folder size as far as i can think of a solution.

And to get the modified date i have to do the same process on the files and sort them by date to find the modified date of the folder.

 

Poll
Which Dropbox Plan do you have?
Who's talking

Top contributors to this post

  • User avatar
    buttflattery Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?