public function directory($source, $destination, $wrapper = '')
    {
        $files = gplcart_file_scan_recursive($source);

        if (empty($files)) {
            return false;
        }

        $this->set($destination, true);

        $added = 0;
        foreach ($files as $file) {

            if (is_dir($file)) {
                $added++;
                continue;
            }

            $prefix = $wrapper === '' ? '' : $wrapper . DIRECTORY_SEPARATOR;
            $relative = $prefix . substr($file, strlen($source) + 1);
            $added += (int) $this->zip->addFile($file, $relative);
        }

        $result = count($files) == $added;
        $this->zip->close();
        return $result;
    }