TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Resource\Filter\FileNameFilter Class Reference

Static Public Member Functions

static filterHiddenFilesAndFolders ($itemName, $itemIdentifier, $parentIdentifier, array $additionalInformation, \TYPO3\CMS\Core\Resource\Driver\DriverInterface $driverInstance)
 
static getShowHiddenFilesAndFolders ()
 
static setShowHiddenFilesAndFolders ($showHiddenFilesAndFolders)
 

Static Protected Attributes

static $showHiddenFilesAndFolders = FALSE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Utility methods for filtering filenames

Author
Andreas Wolf andre.nosp@m.as.w.nosp@m.olf@i.nosp@m.kt-w.nosp@m.erk.d.nosp@m.e

Definition at line 21 of file FileNameFilter.php.

Member Function Documentation

◆ filterHiddenFilesAndFolders()

static TYPO3\CMS\Core\Resource\Filter\FileNameFilter::filterHiddenFilesAndFolders (   $itemName,
  $itemIdentifier,
  $parentIdentifier,
array  $additionalInformation,
\TYPO3\CMS\Core\Resource\Driver\DriverInterface  $driverInstance 
)
static

Filter method that checks if a file/folder name starts with a dot (e.g. .htaccess)

We have to use -1 as the „don't include“ return value, as call_user_func() will return FALSE If calling the method succeeded and thus we can't use that as a return value.

Parameters
string$itemName
string$itemIdentifier
string$parentIdentifier
array$additionalInformationAdditional information (driver dependent) about the inspected item
\TYPO3\CMS\Core\Resource\Driver\DriverInterface$driverInstance
Returns
boolean|integer -1 if the file should not be included in a listing

Definition at line 43 of file FileNameFilter.php.

Referenced by TYPO3\CMS\Core\Tests\Unit\Resource\Filter\FileNameFilterTest\getItemsAndPathsWithHiddenFilesAndFolders_dataProvider().

◆ getShowHiddenFilesAndFolders()

static TYPO3\CMS\Core\Resource\Filter\FileNameFilter::getShowHiddenFilesAndFolders ( )
static

Gets the info whether the hidden files are also displayed currently

Returns
boolean

Definition at line 58 of file FileNameFilter.php.

◆ setShowHiddenFilesAndFolders()

static TYPO3\CMS\Core\Resource\Filter\FileNameFilter::setShowHiddenFilesAndFolders (   $showHiddenFilesAndFolders)
static

Member Data Documentation

◆ $showHiddenFilesAndFolders

TYPO3\CMS\Core\Resource\Filter\FileNameFilter::$showHiddenFilesAndFolders = FALSE
staticprotected