Iterates through every item in a file system directory. More...
#include <opennurbs_file_utilities.h>
Public Member Functions | |
| ON_FileIterator ()=default | |
| ~ON_FileIterator () | |
| ON__UINT64 | CurrentItemCount () const |
| const ON_wString | CurrentItemFullPathName () const |
| bool | CurrentItemIsDirectory () const |
| bool | CurrentItemIsFile () const |
| bool | CurrentItemIsHidden () const |
| ON__UINT64 | CurrentItemLastModifiedTime () const |
| const ON_wString | CurrentItemName () const |
| ON__UINT64 | CurrentItemSize () const |
| const ON_wString | DirectoryName () const |
| bool | FirstItem () |
| Find the first matching item in the directory. More... | |
| bool | Initialize (const wchar_t *directory_name) |
| Initialize where the search should occur. More... | |
| bool | Initialize (const wchar_t *directory_name, const wchar_t *item_name_filter) |
| bool | Initialize (const char *directory_name) |
| bool | Initialize (const char *directory_name, const char *item_name_filter) |
| bool | NextItem () |
| Find the next matching item in the directory. More... | |
| void | Reset () |
| Reset this ON_FileIterator so it can be used again. More... | |
Iterates through every item in a file system directory.
|
default |
| ON_FileIterator::~ON_FileIterator | ( | ) |
| ON__UINT64 ON_FileIterator::CurrentItemCount | ( | ) | const |
| const ON_wString ON_FileIterator::CurrentItemFullPathName | ( | ) | const |
| bool ON_FileIterator::CurrentItemIsDirectory | ( | ) | const |
| bool ON_FileIterator::CurrentItemIsFile | ( | ) | const |
| bool ON_FileIterator::CurrentItemIsHidden | ( | ) | const |
| ON__UINT64 ON_FileIterator::CurrentItemLastModifiedTime | ( | ) | const |
The times returned by ON_FileIterator can differ from the time returned by ON_FileStream::GetFileInformation().
| const ON_wString ON_FileIterator::CurrentItemName | ( | ) | const |
| ON__UINT64 ON_FileIterator::CurrentItemSize | ( | ) | const |
| const ON_wString ON_FileIterator::DirectoryName | ( | ) | const |
| bool ON_FileIterator::FirstItem | ( | ) |
Find the first matching item in the directory.
| bool ON_FileIterator::Initialize | ( | const wchar_t * | directory_name | ) |
Initialize where the search should occur.
| directory_name | [in] The directory to look in. |
| item_name_filter | [in] If this paramter is null, then the iteration includes all names in the directory. The item name to search for. This parameter can include wildcard characters, such as an asterisk (*) or a question mark (?). For example, "\rootdir\subdir\*.*" will iterate all files in the \ directory. |
true: The iterator is set to the first item. false: There are no matching items.
Calling FirstItem() is eqivalent to calling Initialize() and then calling NextItem().
| bool ON_FileIterator::Initialize | ( | const wchar_t * | directory_name, |
| const wchar_t * | item_name_filter | ||
| ) |
| bool ON_FileIterator::Initialize | ( | const char * | directory_name | ) |
| bool ON_FileIterator::Initialize | ( | const char * | directory_name, |
| const char * | item_name_filter | ||
| ) |
| bool ON_FileIterator::NextItem | ( | ) |
Find the next matching item in the directory.
| void ON_FileIterator::Reset | ( | ) |
Reset this ON_FileIterator so it can be used again.