FileNameFilter

class \TYPO3\CMS\Core\Resource\Filter\FileNameFilter

Utility methods for filtering filenames

Table of Contents

Properties

$showHiddenFilesAndFolders  : bool
whether to also show the hidden files (don't show them by default)

Methods

filterHiddenFilesAndFolders()  : bool|int
Filter method that checks if a file/folder name starts with a dot (e.g. .htaccess)
getShowHiddenFilesAndFolders()  : bool
Gets the info whether the hidden files are also displayed currently
setShowHiddenFilesAndFolders()  : bool
set the flag to show (or hide) the hidden files

Properties

$showHiddenFilesAndFolders

whether to also show the hidden files (don't show them by default)

protected static bool $showHiddenFilesAndFolders = false

Methods

filterHiddenFilesAndFolders()

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

public static filterHiddenFilesAndFolders(string $itemName, string $itemIdentifier, string $parentIdentifier, array $additionalInformation, DriverInterface $driverInstance) : bool|int

We use -1 as the "don't include“ return value, for historic reasons, as call_user_func() used to return FALSE if calling the method failed.

Parameters

$itemName : string
$itemIdentifier : string
$parentIdentifier : string
$additionalInformation : array

Additional information (driver dependent) about the inspected item

$driverInstance : DriverInterface

Return values

bool|int —

-1 if the file should not be included in a listing

getShowHiddenFilesAndFolders()

Gets the info whether the hidden files are also displayed currently

public static getShowHiddenFilesAndFolders() : bool

Tags

static

Return values

bool

setShowHiddenFilesAndFolders()

set the flag to show (or hide) the hidden files

public static setShowHiddenFilesAndFolders(bool $showHiddenFilesAndFolders) : bool

Parameters

$showHiddenFilesAndFolders : bool

Tags

static

Return values

bool
On this page