src/cpplibhub/settings.py
def _init_home_dir(cls, delete_old: bool = False) -> None:
        """
        Called on new installation or if directory for some reason does not exist
        """

        # No logging here: logger may have not been initialized

        if file_utils.dir_exists(cls.HOME_DIR):
            if not delete_old:
                return
            else:
                file_utils.remove_dir_noexcept(cls.HOME_DIR)
        if file_utils.create_path_noexcept(cls.HOME_DIR)["error"]:
            print(f"Critical error: can't create home directory {cls.HOME_DIR}")
            sys.exit(-1)

        cls.create_default_settings()
        # TODO: create dir structure

        Called on new installation or if directory for some reason does not exist
        
Called on new installation or if directory for some reason does not exist
Called on new installation or if directory for some reason does not exist
def _init_home_dir(cls, delete_old: bool = False) -> None:
        if file_utils.dir_exists(cls.HOME_DIR):
            if not delete_old:
                return
            else:
                file_utils.remove_dir_noexcept(cls.HOME_DIR)
        if file_utils.create_path_noexcept(cls.HOME_DIR)["error"]:
            print(f"Critical error: can't create home directory {cls.HOME_DIR}")
            sys.exit(-1)
        cls.create_default_settings()
def _init_home_dir ( cls , delete_old : bool = False ) -> None : if file_utils . dir_exists ( cls . HOME_DIR ) : if not delete_old : return else : file_utils . remove_dir_noexcept ( cls . HOME_DIR ) if file_utils . create_path_noexcept ( cls . HOME_DIR ) [ "error" ] : print ( f"Critical error: can't create home directory {cls.HOME_DIR}" ) sys . exit ( - 1 ) cls . create_default_settings ( )
Called on new installation or if directory for some reason does not exist
Called on new installation or if directory for some reason does not exist
"""
        Called on new installation or if directory for some reason does not exist
        """ # No logging here: logger may have not been initialized # TODO: create dir structure
cls
delete_old
bool