mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-03-11 17:13:49 +00:00
documentation(services): move the storage count docstring to parent service class
This commit is contained in:
parent
042a2e4cf2
commit
4475bcea45
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,11 @@ class Service(ABC):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_storage_usage(cls) -> int:
|
def get_storage_usage(cls) -> int:
|
||||||
|
"""
|
||||||
|
Calculate the real storage usage of folders occupied by service
|
||||||
|
Calculate using pathlib.
|
||||||
|
Do not follow symlinks.
|
||||||
|
"""
|
||||||
storage_used = 0
|
storage_used = 0
|
||||||
for folder in cls.get_folders():
|
for folder in cls.get_folders():
|
||||||
storage_used += get_storage_usage(folder)
|
storage_used += get_storage_usage(folder)
|
||||||
|
|
Loading…
Add table
Reference in a new issue