Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lrt::StarFilenameFilter Class Reference

A filename filter which can create folder listings for queries using star patterns. More...

#include <rtfile.h>

Inheritance diagram for lrt::StarFilenameFilter:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual bool accept (const File &parent, const String &child) const
 Filters the folder listing.

virtual ~StarFilenameFilter ()
 StarFilenameFilter (const String &query)
 Creates a StarFilenameFilter for a given query, which may include any number of star characters. More...


Static Public Methods

Array< File > getFiles (const String &query)
 Returns an array including all the files which match the given query. More...


Detailed Description

A filename filter which can create folder listings for queries using star patterns.

Examples are "*.txt" and "c:\Programs\*.exe".

See also:
getFiles()


Constructor & Destructor Documentation

lrt::StarFilenameFilter::StarFilenameFilter (  const String &    query ) 
 

Creates a StarFilenameFilter for a given query, which may include any number of star characters.

Note: Unless you are sure that query doesn't include a path part, use getFiles() instead.

See also:
getFiles()


Member Function Documentation

Array< File > lrt::StarFilenameFilter::getFiles (  const String &    query )  [static]
 

Returns an array including all the files which match the given query.

The query may include any number of star characters '*', which are matched with any number of characters. Question marks, which are matched by exactly one character, are also allowed. This method is normally preferable to using File::list() with a self-constructed StarFilenameFilter as it can handle paths in the query, too.

Example queries: "*.txt", "c:\Programs\*.exe".
Note: Stars in the path part of the query (such as "c:\P*\\hello.txt") are not allowed.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer