def deleteFolder(segments, recursive):
    """
        Delete the folder at `segments`.
        If `recursive` is True the whole folder and its content will be
        deleted.
        If `resursice` is False and folder is not empty it will raise
        `OSError`.
        """
