protected function EmailedExport::verifyArchive in Webform Scheduled Tasks 8.2
Verify a tar file.
Parameters
string $file: The path to the archive.
Return value
bool Check if an archive is empty.
1 call to EmailedExport::verifyArchive()
- EmailedExport::executeTask in src/
Plugin/ WebformScheduledTasks/ Task/ EmailedExport.php - Execute a task.
File
- src/
Plugin/ WebformScheduledTasks/ Task/ EmailedExport.php, line 307
Class
- EmailedExport
- A task which emails an export of a list of webforms.
Namespace
Drupal\webform_scheduled_tasks\Plugin\WebformScheduledTasks\TaskCode
protected function verifyArchive($file) {
// Reading the contents of the archive is enough to raise an exception in
// some cases and archives should always contain at least one file.
$archive = new ArchiveTar($file);
$content = $archive
->listContent();
return !empty($content);
}