mandarons / icloudpy

iCloud web service interface library in Python
Other
188 stars 19 forks source link

[FEATURE] Directory size #44

Closed gniting closed 2 months ago

gniting commented 2 months ago

Use case Get the size of a particular directory on iCloud drive or get the full storage size of iCloud drive.

Describe the solution you'd like Useful when running functions where every file/folder is being evaluated for a sync so that overall progress can be reported.

Describe alternatives you've considered None

Additional context Add any other context or screenshots about the feature request here.

mandarons commented 2 months ago

Size of particular directory is not available through iCloud API (folder size on icloud.com shows 0). But storage information is available. You can use

api = ICloudPyService('jappleseed@apple.com')
print(api.account.storage)