Issue Feature Closed

#82719FileNameFilter is missing basic functionality

Beat Haenger 10/10/17, 13:15 updated 02/07/26, 10:46

Description

TYPO3\CMS\Core\Resource\Filter\FileNameFilter cannot be used to filter files by name. It can only be used to show or hide hidden files. In the current implementation it should be called HiddenFileFilter.

It should be similar to FileExtensionFilter with a function filterFileList that can be called and applies the set name rescrictions.

It should have a getter and setter to give it a filename which must then be matched once filterFileList is called.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 5

  1. Beat Haenger changed description 10/10/17, 13:16

  2. Susanne Moog changed category 10/17/17, 14:21

  3. Susanne Moog changed tracker Bug Feature Tags filter 03/06/19, 13:16

  4. Benni Mack commented and changed status New Needs Feedback 03/23/25, 13:12

    Hey Beat,

    the FileNameFilter is for showing hidden/non-hidden pages. So it serves its purpose.

    However, the part you are looking for can be easily (and probably even better) implemented as you want.

    I did this for the tree filter in FileStorageTreeProvider.php via the method `$resourceStorage->addFileAndFolderNameFilter(callable)` – so I suggest you use this to fit your needs. Does that work?

  5. Georg Ringer commented and changed status Needs Feedback Closed 02/07/26, 10:46

    closing ‘cause of lack of feedback. if still valid, feel free to contact me on slack to open the issue