Public Member Functions | |
XDirectorySearch () | |
XDirectorySearch (const std::string &spec) | |
virtual | ~XDirectorySearch () |
virtual void | setSearchValue (const std::string &search) |
Searching | |
virtual const File * | find (const std::string &spec, unsigned long attribs=IDirectorySearch::FILE_NORMAL) |
virtual const File * | find (unsigned long attribs=IDirectorySearch::FILE_NORMAL) |
virtual const File * | next () |
In/exclusion | |
void | addFilesToInclude (const std::string &spec) |
void | addFilesToExclude (const std::string &spec) |
Protected Member Functions | |
void | setNodes (const std::string &spec) |
There exists some predefined (typedef'ed) classes:
YGP::XDirectorySearch< Parent >::XDirectorySearch | ( | ) | [inline] |
Constructor.
YGP::XDirectorySearch< Parent >::XDirectorySearch | ( | const std::string & | spec | ) | [inline] |
Constructor with specification of which files to search for.
virtual YGP::XDirectorySearch< Parent >::~XDirectorySearch | ( | ) | [inline, virtual] |
Destructor.
void YGP::XDirectorySearch< Parent >::addFilesToExclude | ( | const std::string & | spec | ) | [inline] |
Adds files to exclude in the search.
This files are added at the end of the previously specifed files (and are therefore less significant).
The parameter can also contain a list of files, separated with the character to separate paths of the operating system (the colon (:) in UNIX; the semicolon (;) in DOS/WINDOZE.
void YGP::XDirectorySearch< Parent >::addFilesToInclude | ( | const std::string & | spec | ) | [inline] |
Adds files to include in the search.
This files are added at the end of the previously specifed files (and are therefore less significant).
The parameter can also contain a list of files, separated with the character to separate paths of the operating system (the colon (:) in UNIX; the semicolon (;) in DOS/WINDOZE.
virtual const File* YGP::XDirectorySearch< Parent >::find | ( | unsigned long | attribs = IDirectorySearch::FILE_NORMAL |
) | [inline, virtual] |
Returns the first found file, having the attributes attribs
.
virtual const File* YGP::XDirectorySearch< Parent >::find | ( | const std::string & | spec, | |
unsigned long | attribs = IDirectorySearch::FILE_NORMAL | |||
) | [inline, virtual] |
Returns the first found file matching spec
, having the attributes attribs
.
virtual const File* YGP::XDirectorySearch< Parent >::next | ( | ) | [inline, virtual] |
Returns the next file matching the previously specifed search criteria.
void YGP::XDirectorySearch< Parent >::setNodes | ( | const std::string & | spec | ) | [inline, protected] |
Sets directly the files to in- or exclude.
Spec
must be in the right format (e.g. every node must have a prefix (i or x) specifying if it should be added or removed.
virtual void YGP::XDirectorySearch< Parent >::setSearchValue | ( | const std::string & | search | ) | [inline, virtual] |
Sets the value for the next search. Clears the previously specified nodes.