JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::FileFilter Class Referenceabstract

Interface for deciding which files are suitable for something. More...

#include <juce_FileFilter.h>

Inheritance diagram for juce::FileFilter:
Collaboration diagram for juce::FileFilter:

Public Member Functions

 FileFilter (const String &filterDescription)
 Creates a filter with the given description. More...
 
virtual ~FileFilter ()
 Destructor. More...
 
const StringgetDescription () const noexcept
 Returns the description that the filter was created with. More...
 
virtual bool isDirectorySuitable (const File &file) const =0
 Should return true if this directory is suitable for inclusion in whatever context the object is being used. More...
 
virtual bool isFileSuitable (const File &file) const =0
 Should return true if this file is suitable for inclusion in whatever context the object is being used. More...
 

Protected Attributes

String description
 

Detailed Description

Interface for deciding which files are suitable for something.

For example, this is used by DirectoryContentsList to select which files go into the list.

See also
WildcardFileFilter, DirectoryContentsList, FileListComponent, FileBrowserComponent

@tags{Core}

Constructor & Destructor Documentation

◆ FileFilter()

juce::FileFilter::FileFilter ( const String filterDescription)

Creates a filter with the given description.

The description can be returned later with the getDescription() method.

◆ ~FileFilter()

virtual juce::FileFilter::~FileFilter ( )
virtual

Destructor.

Member Function Documentation

◆ getDescription()

const String& juce::FileFilter::getDescription ( ) const
noexcept

Returns the description that the filter was created with.

◆ isDirectorySuitable()

virtual bool juce::FileFilter::isDirectorySuitable ( const File file) const
pure virtual

Should return true if this directory is suitable for inclusion in whatever context the object is being used.

Implemented in juce::WildcardFileFilter, and juce::FileBrowserComponent.

◆ isFileSuitable()

virtual bool juce::FileFilter::isFileSuitable ( const File file) const
pure virtual

Should return true if this file is suitable for inclusion in whatever context the object is being used.

Implemented in juce::WildcardFileFilter, and juce::FileBrowserComponent.

Member Data Documentation

◆ description

String juce::FileFilter::description
protected

The documentation for this class was generated from the following file: