$path = ImportExportFileEntity::
buildPath($fileId);
// since the file could be stored in any one directory of the available activities
foreach ($activities as $activitiy) { $paths[] =
$activitiy . '/' .
$path;
// if file is not of an export there might be a log of invalid records
if ($activitiy !== ImportExportLogEntity::ACTIVITY_EXPORT
) { $paths[] =
$activitiy . '/' .
$path . '_invalid';
} } } $message =
new DeleteFileMessage();
$message->
setFiles($paths);
$this->messageBus->
dispatch($message);
}}