protected function _clearDir($dir) {

        $dirPath = $this->Dir->pwd() . $dir;

        if ( ! $this->isExistFolder($dir) ) {
            $this->err("Error : directory {$dir} not exist");
            return false;
        }

        if ( ! $this->Dir->delete($dirPath) ) {
            $this->err("Error : delete directory {$dir} failed");
            $this->verbose($this->Dir->errors());
            return false;
        }

        if ( ! $this->Dir->create($dirPath, 0777) ) {
            $this->err("Error : recreate directory {$dir} failed");
            $this->verbose($this->Dir->errors());
            return false;
        }

        return true;
    }