49 if (TYPO3_OS ==
'WIN') {
50 throw new \BadMethodCallException(
'This task is not reliable for Windows OS', 1308270454);
52 $seconds = 60 * 60 * 24 * (int)$this->numberOfDays;
53 $timestamp =
$GLOBALS[
'EXEC_TIME'] - $seconds;
55 $directory = PATH_site .
'fileadmin/';
56 if (!empty(
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir'])) {
57 $directory = PATH_site . trim(
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir']);
74 $timestamp = (int)$timestamp;
76 if (!@is_dir($directory)) {
77 throw new \RuntimeException(
'Given directory "' . $directory .
'" does not exist', 1301614535);
80 $directoryContent = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($directory));
81 foreach ($directoryContent as $fileName => $file) {
83 $filePath = $file->getPath();
84 if (substr($filePath, strrpos($filePath,
'/') + 1) !== $this->recyclerDirectory) {
88 if ($file->isFile() && $timestamp > $file->getCTime()) {
89 if (!@unlink($fileName)) {
90 throw new \RuntimeException(
'Could not remove file "' . $fileName .
'"', 1301614537);
cleanupRecycledFiles($directory, $timestamp)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static getFileAbsFileName($filename, $onlyRelative=TRUE, $relToTYPO3_mainDir=FALSE)