from pathlib import Path


def _get_data_size_of_dir(path: Path) -> float:
    """Returns the data volume / size of a directory given at path.

    Parameters
    ----------
    path : Path
        Path for which the size should be determined

    Returns
    -------
    float
        Value between 0 and the max size of your disk in mega bytes.
    """

    return round(sum(f.stat().st_size for f in path.glob("**/*") if f.is_file()) / 1024**2, 4)