
    uin                         d dl Z dedefdZdS )    N	directoryreturnc                    d}t          j        |           D ]l\  }}}|D ]c}t           j                            ||          }t           j                            |          s"|t           j                            |          z  }dm|S )a   
    Calculate the total size of the directory by walking through each file.

    Parameters:
    directory (str): The path of the directory for which to calculate the size.

    Returns:
    total_size (int): The total size of the directory in bytes.
    r   )oswalkpathjoinislinkgetsize)r   
total_sizedirpath_	filenamesffps          K/var/www/icac/venv/lib/python3.11/site-packages/chromadb/utils/directory.pyget_directory_sizer      s     J!#!3!3 2 2I 	2 	2Agq))B7>>"%% 2bgoob111
		2     )r   strintr    r   r   <module>r      s:    				# #      r   