System.IOUtils.TDirectory.GetDirectoriesEnumerator
Delphi
class function GetDirectoriesEnumerator(const Path: string): IEnumerable<string>;
class function GetDirectoriesEnumerator(const Path: string;
const Predicate: TFilterPredicate): IEnumerable<string>;
class function GetDirectoriesEnumerator(const Path,
SearchPattern: string): IEnumerable<string>; overload; inline; static;
class function GetDirectoriesEnumerator(const Path, SearchPattern: string;
const Predicate: TFilterPredicate): IEnumerable<string>;
class function GetDirectoriesEnumerator(const Path, SearchPattern: string;
const SearchOption: TSearchOption): IEnumerable<string>; overload; static;
class function GetDirectoriesEnumerator(const Path, SearchPattern: string;
const SearchOption: TSearchOption;
const Predicate: TFilterPredicate): IEnumerable<string>; overload; static;
class function GetDirectoriesEnumerator(const Path: string;
const SearchOption: TSearchOption;
const Predicate: TFilterPredicate): IEnumerable<string>; overload; static;
C++
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path)/* overload */;
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path, const _di_TFilterPredicate Predicate)/* overload */;
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path, const System::UnicodeString SearchPattern)/* overload */;
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const _di_TFilterPredicate Predicate)/* overload */;
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption)/* overload */;
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path, const System::UnicodeString SearchPattern, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
static System::DelphiInterface<System::IEnumerable__1<System::UnicodeString> > __fastcall GetDirectoriesEnumerator(const System::UnicodeString Path, const TSearchOption SearchOption, const _di_TFilterPredicate Predicate)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TDirectory |
Description
Enumerates the subdirectories in a given directory.
Use GetDirectoriesEnumerator to obtain an enumerator object, returning subdirectories in a given directory.
There are three forms of the GetDirectoriesEnumerator method:
- The first form only accepts the path of the directory for which subdirectories are enumerated.
- The second form includes a search pattern used when matching subdirectory names.
- The third form includes an option specifying whether a recursive mode will be used while enumerating.
All the forms also accept an optional TFilterPredicate parameter, used to filter the results.
The following table lists the parameters expected by this method.
Name | Meaning |
---|---|
Path |
The path of the directory for which subdirectories are enumerated. |
SearchPattern |
The mask used when matching directory names (for example, "*app" matches all the directories ending with "app"). |
SearchOption |
The directory enumeration mode. Specifies whether the top-level or recursive enumeration mode will be used. |
Predicate |
A routine used to filter out undesired results. |
See Also
Code Examples