UTF8 - Simple Library for Internationalization
Loading...
Searching...
No Matches
utf8::file_enumerator Class Reference

An object - oriented wrapper for find_... functions. More...

#include <winutf8.h>

Inheritance diagram for utf8::file_enumerator:
utf8::find_data

Public Member Functions

 file_enumerator (const std::string &name)
 Constructs a file_enumerator object and tries to locate the first file.
 
 ~file_enumerator ()
 Closes the search handle associated with this object.
 
bool ok () const
 Return true if a file has been enumerated.
 
bool next ()
 Advance the enumerator to next file.
 
 operator bool () const
 

Additional Inherited Members

- Protected Attributes inherited from utf8::find_data
HANDLE handle
 search handle
 
DWORD attributes
 file attributes
 
FILETIME creation_time
 file creation time
 
FILETIME access_time
 file last access time
 
FILETIME write_time
 file last write time
 
__int64 size
 file size
 
std::string filename
 file name
 
std::string short_name
 8.3 file name
 

Detailed Description

An object - oriented wrapper for find_... functions.

This object wraps a Windows search handle used in find_first/find_next functions.

Use like in the following example:

utf8::file_enumerator collection("sample.*");
while (collection.ok())
{
cout << collection.filename () << endl;
collection.next ();
}
An object - oriented wrapper for find_... functions.
Definition winutf8.h:141

Member Function Documentation

◆ operator bool()

utf8::file_enumerator::operator bool ( ) const
inline

Syntactic sugar for ok() function Return true if a file has been enumerated


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