ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
No Matches
FFilter Struct Referenceabstract


This is a straight forward simple abstract class with just one interface method which has to return true if an file is included (not filtered) or false if it is not included and thus to be filtered out.
Instead of the provision of an FInfo object, a cursor of an FTree is provided. This allows more detailed inspection of parent directories, if needed. In addition the full path string (the real path, all symbolic links translated) is provided. While this could be assembled from the given cursor node , the provision is made to allow highest execution performance, as the string is available during the scan process anyhow.

Instances of derived (non abstract) implementations, can optionally be attached to fields FileFilter , DirectoryFilterPreRecursion and DirectoryFilterPostRecursion of class ScanParameters to filter files during the scan process.

Users of the API might also create code that uses this interface type for post-scan filtering, but in this case may of-course also rely on own implementations/mechanics.

Definition at line 38 of file ffilter.hpp.

#include <ffilter.hpp>

Inheritance diagram for FFilter:

Public Method Index:

virtual ~FFilter ()=default
virtual bool Includes (const FTree::ConstCursor &node, const String &parentPath)=0

Constructor(s) / Destructor Details::

◆ ~FFilter()

virtual ~FFilter ( )


Method Details:

◆ Includes()

virtual bool Includes ( const FTree::ConstCursor & node,
const String & parentPath )
pure virtual

Abstract virtual method to evaluate the inclusion of the given FInfo object.

nodeThe node in the file-tree to examine.
parentPathThe absolute path to the parent directory that the file resides in.
The result determines, whether the given file or directory has passed the filter or not. Consequently, true means "passed" and false means "filtered out".

Implemented in FileExpressions::Filter.

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