Loading...
Searching...
No Matches
juce::FileFilter Class Referenceabstract

## 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

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

- juce_core/files/juce_FileFilter.h

Inheritance diagram for juce::FileFilter:

## Public Member Functions

| FileFilter (const String &filterDescription)
| Creates a filter with the given description.
virtual | ~FileFilter ()
| Destructor.
const String & | getDescription () const noexcept
| Returns the description that the filter was created with.
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.
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.

## Protected Attributes

String | description

## Constructors and Destructors

## FileFilter()

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

Creates a filter with the given description.

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

Referenced by juce::FileBrowserComponent::FileBrowserComponent(), juce::FileBrowserComponent::resetRecentPaths(), and juce::FileBrowserComponent::setFileFilter().

## ~FileFilter()

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

virtual

Destructor.

## Member Functions

## getDescription()

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

noexcept

Returns the description that the filter was created with.

## 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::FileBrowserComponent, and juce::WildcardFileFilter.

References isFileSuitable().

Referenced by isFileSuitable().

## 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::FileBrowserComponent, and juce::WildcardFileFilter.

References isDirectorySuitable().

Referenced by isDirectorySuitable().

## Member Data Documentation

## description

String juce::FileFilter::description

protected

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited