public function extract($file, $target, $delete = false)
    {
        $zip = new \ZipArchive();
        $x = $zip->open($file);
        if ($x === true) {
            $zip->extractTo($target);
            $zip->close();
            if ($delete === true) {
                unlink($file);
            }

            return true;
        }
    }