Typo3tempFileService

Service class to manage typo3temp/assets and FAL storage processed file statistics / cleanup.

Internal

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 (not _processed_!)
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<string|int, mixed>
Returns a list of directory names in typo3temp/assets and their number of files
getStatsFromStorageByUid()  : array<string|int, mixed>
getStatsFromStorage()  : array<string|int, mixed>
statsFromStorages()  : array<string|int, mixed>
Directory statistics for configured FAL storages.
statsFromTypo3temp()  : array<string|int, mixed>
Directory statistics for typo3temp/assets folders with some special handling for legacy processed file storage _processed_
statsFromTypo3tempProcessed()  : array<string|int, mixed>
Directory statistics for typo3temp/assets/_processed_ folder

Methods

clearAssetsFolder()

Clears files and folders in a typo3temp/assets/ folder (not _processed_!)

public clearAssetsFolder(string $folderName) : bool
Parameters
$folderName : string
Tags
throws
RuntimeException

If folder path is not valid

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<string|int, mixed>
Return values
array<string|int, mixed>

getStatsFromStorageByUid()

public getStatsFromStorageByUid(int $storageUid) : array<string|int, mixed>
Parameters
$storageUid : int
Return values
array<string|int, mixed>

statsFromStorages()

Directory statistics for configured FAL storages.

protected statsFromStorages() : array<string|int, mixed>
Return values
array<string|int, mixed>

statsFromTypo3temp()

Directory statistics for typo3temp/assets folders with some special handling for legacy processed file storage _processed_

protected statsFromTypo3temp() : array<string|int, mixed>
Return values
array<string|int, mixed>

statsFromTypo3tempProcessed()

Directory statistics for typo3temp/assets/_processed_ folder

protected statsFromTypo3tempProcessed() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results