ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
FFilter Struct Referenceabstract

Description:

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 34 of file ffilter.hpp.

#include <ffilter.hpp>

Inheritance diagram for FFilter:
[legend]

Public Method Index:

virtual ~FFilter ()=default
 Destructor.
 
virtual bool Includes (const File &file, const lang::system::PathString &parentPath)=0
 

Method Details:

◆ Includes()

virtual bool Includes ( const File & file,
const lang::system::PathString & parentPath )
pure virtual

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

Parameters
fileThe node in the file-tree to examine.
parentPathThe absolute path to the parent directory that the file resides in.
Returns
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: