
    ugn                         d dl Z dedefdZy)    N	directoryreturnc                    d}t        j                  |       D ]o  \  }}}|D ]d  }t         j                  j                  ||      }t         j                  j	                  |      rC|t         j                  j                  |      z  }f q |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          M/var/www/openai/venv/lib/python3.12/site-packages/chromadb/utils/directory.pyget_directory_sizer      sp     J!#!3IAgq)B77>>"%bggoob11
	  "4     )r   strintr    r   r   <module>r      s    	# # r   