def get_folder_size(filepath, follow_symlinks=False): """ Calculates the total size of a given directory (including all subdirectories and files). Args: filepath (str): The path to the directory.