Typo3tempFileService
Read onlyYes
Service class to manage typo3temp/assets and FAL storage processed file statistics / cleanup.
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Methods
- __construct() : mixed
- clearAssetsFolder() : bool
- Clears files and folders in a typo3temp/assets/ folder
- clearProcessedFiles() : int
- Clear processed files. The sys_file_processedfile table is cleared for given storage uid and the physical files of local processed storages are deleted.
- getDirectoryStatistics() : array
- Returns a list of directory names in typo3temp/assets and their number of files
- getStatsFromStorageByUid() : array
- getStatsFromStorage() : array
- statsFromStorages() : array
- Directory statistics for configured FAL storages.
- statsFromTypo3temp() : array
- Directory statistics for typo3temp/assets folders
Methods
__construct()
public
__construct(ProcessedFileRepository $processedFileRepository, StorageRepository $storageRepository) : mixed
Parameters
- $processedFileRepository : ProcessedFileRepository
- $storageRepository : StorageRepository
clearAssetsFolder()
Clears files and folders in a typo3temp/assets/ folder
public
clearAssetsFolder(string $folderName) : bool
Parameters
- $folderName : string
Tags
Return values
bool —TRUE if all went well
clearProcessedFiles()
Clear processed files. The sys_file_processedfile table is cleared for given storage uid and the physical files of local processed storages are deleted.
public
clearProcessedFiles(int $storageUid) : int
Parameters
- $storageUid : int
Return values
int —0 if all went well, if >0 this number of files that could not be deleted
getDirectoryStatistics()
Returns a list of directory names in typo3temp/assets and their number of files
public
getDirectoryStatistics() : array
Return values
arraygetStatsFromStorageByUid()
public
getStatsFromStorageByUid(int $storageUid) : array
Parameters
- $storageUid : int
Return values
arraygetStatsFromStorage()
protected
getStatsFromStorage(ResourceStorage $storage) : array
Parameters
- $storage : ResourceStorage
Return values
arraystatsFromStorages()
Directory statistics for configured FAL storages.
protected
statsFromStorages() : array
Return values
arraystatsFromTypo3temp()
Directory statistics for typo3temp/assets folders
protected
statsFromTypo3temp() : array