‪TYPO3CMS  9.5
TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\GeneralUtilityFilesystemFixture Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\GeneralUtilityFilesystemFixture:
TYPO3\CMS\Core\Utility\GeneralUtility

Static Public Member Functions

static bool isAbsPath ($path)
 
static bool isAllowedAbsPath ($path)
 
static bool validPathStr ($theFile)
 
static string writeFileToTypo3tempDir ($filepath, $content)
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Utility\GeneralUtility
const SYSLOG_SEVERITY_INFO = 0
 
const SYSLOG_SEVERITY_NOTICE = 1
 
const SYSLOG_SEVERITY_WARNING = 2
 
const SYSLOG_SEVERITY_ERROR = 3
 
const SYSLOG_SEVERITY_FATAL = 4
 
const ENV_TRUSTED_HOSTS_PATTERN_ALLOW_ALL = '.*'
 
const ENV_TRUSTED_HOSTS_PATTERN_SERVER_NAME = 'SERVER_NAME'
 
static if(empty($labels)) if(isset($defaultFormats[$labels])) else
 
if($base !==1000 && $base !==1024) $labelArr = explode('|', str_replace('"', '', $labels))
 
 $oldLocale = setlocale(LC_NUMERIC, 0)
 
 $newLocale = $GLOBALS['TSFE']->config['config']['locale_all'] ?? ''
 
if($newLocale) $localeInfo = localeconv()
 
if($newLocale) $sizeInBytes = max($sizeInBytes, 0)
 
 $multiplier = floor(($sizeInBytes ? log($sizeInBytes) : 0) / log($base))
 
 $sizeInUnits = $sizeInBytes / pow($base, $multiplier)
 
if($sizeInUnits >($base *.9)) $multiplier = min($multiplier, count($labelArr) - 1)
 
- ‪Static Protected Attributes inherited from ‪TYPO3\CMS\Core\Utility\GeneralUtility
static bool $allowHostHeaderValue = false
 

Detailed Description

Member Function Documentation

◆ isAbsPath()

static bool TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\GeneralUtilityFilesystemFixture::isAbsPath (   $path)
static

For testing we must allow vfs:// as first part of file path

Parameters
string$pathFile path to evaluate
Returns
‪bool

Definition at line 30 of file GeneralUtilityFilesystemFixture.php.

◆ isAllowedAbsPath()

static bool TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\GeneralUtilityFilesystemFixture::isAllowedAbsPath (   $path)
static

For testing we must allow vfs:// as first part file path

Parameters
string$pathFile path to evaluate
Returns
‪bool

Definition at line 41 of file GeneralUtilityFilesystemFixture.php.

◆ validPathStr()

static bool TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\GeneralUtilityFilesystemFixture::validPathStr (   $theFile)
static

For testing we must allow vfs:// as first part of file path

Parameters
string$theFileFile path to evaluate
Returns
‪bool TRUE, $theFile is allowed path string, FALSE otherwise

Definition at line 52 of file GeneralUtilityFilesystemFixture.php.

◆ writeFileToTypo3tempDir()

static string TYPO3\CMS\Core\Tests\Unit\Utility\Fixtures\GeneralUtilityFilesystemFixture::writeFileToTypo3tempDir (   $filepath,
  $content 
)
static

For testing we must skip the path checks

Parameters
string$filepath‪Absolute file path to write to inside "typo3temp/". First part of this string must match Environment::getPublicPath() ."/typo3temp/"
string$content‪Content string to write
Returns
‪string Returns NULL on success, otherwise an error string telling about the problem.

Definition at line 64 of file GeneralUtilityFilesystemFixture.php.

Referenced by TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsCorrectlySetsPermissionsRecursive(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsDefaultPermissionsToFile(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsGroup(), TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToFile(), and TYPO3\CMS\Core\Tests\Unit\Utility\GeneralUtilityTest\fixPermissionsSetsPermissionsToHiddenFile().