medcat2.utils.fileutils ======================= .. py:module:: medcat2.utils.fileutils Functions --------- .. autoapisummary:: medcat2.utils.fileutils.ensure_folder_if_parent Module Contents --------------- .. py:function:: ensure_folder_if_parent(folder_name) Ensure the folder exists if its parent folder exists. Create a folder if the parent folder exists. If the parent folder does not exist, raise an error. :param folder_name: The target folder. :type folder_name: str :raises ValueError: If the parent folder does not exist.