protected function createConfigDirectory()
    {
        $this->displayMsgInCli(' >> Create config directory for this module ... ');
        
        $alreadyExist = file_exists($this->targetConfigPath);
        
        //If the directory already exist and if it's a reinstall
        if ($alreadyExist && $this->forceReinstall === true) {
            $this->displayMsgInCli('[Force Reinstall: Remove directory] ');
            
            $alreadyExist = false;
            if (!$this->removeRecursiveDirectory($this->targetConfigPath)) {
                $this->displayMsgNLInCli(
                    'Remove the module config directory have fail',
                    'red',
                    'bold'
                );
                
                throw new Exception(
                    'Reinstall fail. Remove module config directory error',
                    $this::ERR_REINSTALL_FAIL_REMOVE_CONFIG_DIR
                );
            }
        }
        
        //If the directory already exist, nothing to do
        if ($alreadyExist) {
            $this->displayMsgNLInCli('Already exist', 'yellow', 'bold');
            return;
        }
        
        //Create the directory
        if (!mkdir($this->targetConfigPath, 0755)) {
            $this->displayMsgNLInCli('Fail', 'red', 'bold');
            
            throw new Exception(
                'Error to create the config directory.',
                $this::ERR_FAIL_CREATE_CONFIG_DIR
            );
        }

        $this->displayMsgNLInCli('Done', 'green', 'bold');
    }
protected function createConfigDirectory()
    {
        $this->displayMsgInCli(' >> Create config directory for this module ... ');
        
        $alreadyExist = file_exists($this->targetConfigPath);
        
        //If the directory already exist and if it's a reinstall
        if ($alreadyExist && $this->forceReinstall === true) {
            $this->displayMsgInCli('[Force Reinstall: Remove directory] ');
            
            $alreadyExist = false;
            if (!$this->removeRecursiveDirectory($this->targetConfigPath)) {
                $this->displayMsgNLInCli(
                    'Remove the module config directory have fail',
                    'red',
                    'bold'
                );
                
                throw new Exception(
                    'Reinstall fail. Remove module config directory error',
                    $this::ERR_REINSTALL_FAIL_REMOVE_CONFIG_DIR
                );
            }
        }
        
        //If the directory already exist, nothing to do
        if ($alreadyExist) {
            $this->displayMsgNLInCli('Already exist', 'yellow', 'bold');
            return;
        }
        
        //Create the directory
        if (!mkdir($this->targetConfigPath, 0755)) {
            $this->displayMsgNLInCli('Fail', 'red', 'bold');
            
            throw new Exception(
                'Error to create the config directory.',
                $this::ERR_FAIL_CREATE_CONFIG_DIR
            );
        }

        $this->displayMsgNLInCli('Done', 'green', 'bold');
    }
protected function createConfigDirectory ( ) { $ this -> displayMsgInCli ( ' >> Create config directory for this module ... ' ) ; $ alreadyExist = file_exists ( $ this -> targetConfigPath ) ; //If the directory already exist and if it's a reinstall if ( $ alreadyExist && $ this -> forceReinstall === true ) { $ this -> displayMsgInCli ( '[Force Reinstall: Remove directory] ' ) ; $ alreadyExist = false ; if ( ! $ this -> removeRecursiveDirectory ( $ this -> targetConfigPath ) ) { $ this -> displayMsgNLInCli ( 'Remove the module config directory have fail' , 'red' , 'bold' ) ; throw new Exception ( 'Reinstall fail. Remove module config directory error' , $ this :: ERR_REINSTALL_FAIL_REMOVE_CONFIG_DIR ) ; } } //If the directory already exist, nothing to do if ( $ alreadyExist ) { $ this -> displayMsgNLInCli ( 'Already exist' , 'yellow' , 'bold' ) ; return ; } //Create the directory if ( ! mkdir ( $ this -> targetConfigPath , 0755 ) ) { $ this -> displayMsgNLInCli ( 'Fail' , 'red' , 'bold' ) ; throw new Exception ( 'Error to create the config directory.' , $ this :: ERR_FAIL_CREATE_CONFIG_DIR ) ; } $ this -> displayMsgNLInCli ( 'Done' , 'green' , 'bold' ) ; }
Create a directory into project config directory for the module

@return void

@throws \Exception : If remove directory fail with the reinstall option
Create a directory into project config directory for the module