BeforeFileProcessingEvent 

The PSR-14 event \TYPO3\CMS\Core\Resource\Event\BeforeFileProcessingEvent is fired before a file object is processed. This allows to add further information or enrich the file before the processing is kicking in.

Changed in version 15.0 Breaking: #110702 - Widened FAL processing task interfaces

The event is also dispatched for system resources from EXT: and PKG:. For them, getFile() returns a SystemResourceInterface and getDriver() returns null. Check both before you use methods that only a FAL file or a driver has.

Example 

API 

final class BeforeFileProcessingEvent
Fully qualified name
\TYPO3\CMS\Core\Resource\Event\BeforeFileProcessingEvent

This event is fired before a file object is processed.

Allows to add further information or enrich the file before the processing is kicking in.

The driver is only present for a FAL File; a resource outside the File Abstraction Layer (for example a system resource shipped with a package) has none, since it is never fetched through a ResourceStorage driver in the first place.

getProcessedFile()
Returns
\TYPO3\CMS\Core\Resource\ProcessedResourceInterface
setProcessedFile(\TYPO3\CMS\Core\Resource\ProcessedResourceInterface $processedFile)
param $processedFile

the processedFile

getDriver()
Returns
?\TYPO3\CMS\Core\Resource\Driver\DriverInterface
getFile()
Returns
\TYPO3\CMS\Core\Resource\FileInterface|\TYPO3\CMS\Core\SystemResource\Type\SystemResourceInterface
getTaskType()
Returns
string
getConfiguration()
Returns
array