public function deleteFiles()
{
if (stringBeginsWith($this->ImportPath, 'Db:', true)) {
return;
}
$St = Gdn::structure();
foreach (val('Tables', $this->Data, array()) as $Table => $TableInfo) {
$Path = val('Path', $TableInfo, '');
if (file_exists($Path)) {
unlink($Path);
}
// Drop the import table.
$St->table("z{$Table}")->drop();
}
// Delete the uploaded files.
$UploadedFiles = val('UploadedFiles', $this->Data, array());
foreach ($UploadedFiles as $Path => $Name) {
safeUnlink($Path);
}
}