Skip to content

Commit

Permalink
Add docstring for dir_size
Browse files Browse the repository at this point in the history
  • Loading branch information
uwefladrich committed Apr 18, 2022
1 parent a6c1047 commit faad94b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions monitoring/diskusage_rte_scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@


def _dir_size(dir):
"""Counts (recursively) the size of all files stored in a directory and
returns the sum (size in bytes). Note that all files and (sub)directories
that are not readable (i.e. due to missing permissions) are ignored."""
if not dir.exists():
raise FileNotFoundError
if not dir.is_dir():
Expand Down

0 comments on commit faad94b

Please sign in to comment.