PCL
|
Directory search operation. More...
#include <File.h>
Public Member Functions | |
Find ()=default | |
Find (const Find &)=delete | |
Find (const String &path) | |
~Find () | |
void | Begin (const String &path) |
void | End () |
bool | NextItem (FindFileInfo &info) |
Find & | operator= (const Find &)=delete |
String | SearchPath () const |
This class can be used as an iterator to find all files and subdirectories within a directory tree.
In the following example, the ProcessFiles function calls a functor object, specified as the processFile function argument, for each file found recursively in the specified dirPath directory. The functor's unique argument is the absolute file path of an existing file.
|
default |
Constructs an inactive File::Find object.
|
inline |
|
inline |
|
delete |
Copy constructor. This constructor is disabled because File::Find instances are unique.
void pcl::File::Find::Begin | ( | const String & | path | ) |
Starts a new directory search operation for the specified path.
The specified path can include wildcards to define a pattern to search for a set of directory items.
void pcl::File::Find::End | ( | ) |
Finalizes the current directory search operation, if there is one active.
bool pcl::File::Find::NextItem | ( | FindFileInfo & | info | ) |
Attempts to retrieve the next item in the current directory search operation.
Returns true if a new item has been retrieved. In such case the info structure receives the data corresponding to the retrieved item. Returns false if there are no more items available, signaling the end of the current directory search operation, or if a search operation has not been initiated by a previous call to Begin(). In such case the info structure is not modified.
Copy assignment. This operator is disabled because File::Find instances are unique.
|
inline |