DropzoneTempCleaner
in package
FinalYes
Cleans up dropzone temporary folders (`temp/dropzone/<subDir>/Y/m/d/<token>/`).
Files are removed from temp/ only after a successful form save, so an unsent (or just loaded)
form would leave its folder forever. The cleanup deletes files older than $maxAgeSeconds and
then empty folders that were unchanged for the same time. It does not follow symlinks (only the
link is deleted) and never touches anything outside the given root.
Run by the cron DropzoneTempPresenter.
Table of Contents
Constants
- DEFAULT_MAX_AGE : int = 86400
Methods
- purge() : array{files: int, dirs: int, bytes: int}
- isEmptyDir() : bool
Constants
DEFAULT_MAX_AGE
public
int
DEFAULT_MAX_AGE
= 86400
Methods
purge()
public
purge(string $dropzoneRoot[, int $maxAgeSeconds = self::DEFAULT_MAX_AGE ][, int|null $now = null ]) : array{files: int, dirs: int, bytes: int}
Parameters
- $dropzoneRoot : string
- $maxAgeSeconds : int = self::DEFAULT_MAX_AGE
- $now : int|null = null
Return values
array{files: int, dirs: int, bytes: int}isEmptyDir()
private
isEmptyDir(string $path) : bool
Parameters
- $path : string