@staticmethod
def _allocate_space(current_directory) ->int:
    """Attempt to allocate directory `data{n}`, increment until success.

        Returns
        -------
        _postfix : int
            The number corresponding to the allocated directory.
        """
    _postfix = 0
    while True:
        _attempt = current_directory.joinpath('data' + str(_postfix))
        if not _attempt.exists():
            _attempt.mkdir(parents=True)
            break
        else:
            _postfix += 1
    return _postfix
