From d9020e43a26a3723427b94b2a73c25126ad10c77 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 3 Oct 2018 22:00:22 +0900 Subject: utils.py: Document _get_dir_size() expectations. This function assumes that files do not disappear while walking the given directory. --- buildstream/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'buildstream/utils.py') diff --git a/buildstream/utils.py b/buildstream/utils.py index 7cff6c54b..5c11a363c 100644 --- a/buildstream/utils.py +++ b/buildstream/utils.py @@ -563,6 +563,9 @@ def save_file_atomic(filename, mode='w', *, buffering=-1, encoding=None, # # Get the disk usage of a given directory in bytes. # +# This function assumes that files do not inadvertantly +# disappear while this function is running. +# # Arguments: # (str) The path whose size to check. # -- cgit v1.2.1