DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dueca::FindFiles Class Reference

Find a list of files matching a "glob" pattern. More...

#include <FindFiles.hxx>

Inheritance diagram for dueca::FindFiles:
Inheritance graph
[legend]
Collaboration diagram for dueca::FindFiles:
Collaboration graph
[legend]

Public Member Functions

 FindFiles ()
 Default constructor, no arguments.
 
 FindFiles (const char *pattern)
 Constructor with a pattern.
 
void scan (const char *pattern)
 Re-scan a glob pattern.
 

Detailed Description

Find a list of files matching a "glob" pattern.

For example,

FindFiles incos("*.inco");
Find a list of files matching a "glob" pattern.
Definition FindFiles.hxx:77
This is a "light weight object" that enables you to read the latest set of data on a StreamChannelEnd...
Definition StreamReaderLatest.hxx:43

Will produce an object incos which lists all files with an extension .inco. Note that the files are not opened, you only get a list of names.

The FindFiles object derives from the vector<string> template from the standard template library. You can use the normal methods to read out this object, e.g.

for (FindFiles::const_iterator ii = incos.begin();
ii != incos.end(); ii++) {
// do something with *ii
}
// or
for (int ii = 0; ii < incos.size(); ii++) {
cout << incos[ii] << endl;
}

Constructor & Destructor Documentation

◆ FindFiles()

dueca::FindFiles::FindFiles ( const char * pattern)

Constructor with a pattern.

Parameters
patternglob pattern

Member Function Documentation

◆ scan()

void dueca::FindFiles::scan ( const char * pattern)

Re-scan a glob pattern.

This discards old stuff!

Parameters
patternglob pattern

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