Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TDirectoryTreeIterator
Purpose:
Iterates over the contents of a directory.
Instantiation:
Allocate on the heap or the stack. The stack is preferred.
Deriving Classes:
Do not derive from this class.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- virtual TFileSystemEntity Next ()
- virtual TFileSystemEntity Next (TPropertySet & fillinProperties)
Interface Category:
API.
Purpose:
- Returns the next item in the iteration.
- Returns the next item in the iteration and fills in the requested properties.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- TPropertySet & fillinProperties -The set of requested properties to be filled in.
Return Value:
The file system entity that is next in the iteration. If all entities have been exhausted, kEndOfIteration is returned.
Exceptions:
- Throws TFileSystemObjectInvalid if First has not been called, or if the iterator has not been initialized.
- Throws TFileSystemTypeMismatch if the query evaluation causes a type mismatch.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
- virtual TFileSystemEntity First ()
- virtual TFileSystemEntity First (TPropertySet & fillinProperties)
Interface Category:
API.
Purpose:
- Resets the iterator and returns the first item in the iteration.
- Resets the iterator, returns the first item in the iteration, and returns all properties specified in fillinProperties.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- TPropertySet & fillinProperties -The set of requested properties to be filled in.
Return Value:
The file system entity that is first in the iteration. If the directory is empty, then kEndOfIteration is returned.
Exceptions:
Throws TFileSystemObjectInvalid if the iterator has not been initialized.
Throws TFileSystemTypeMismatch if the query evaluation causes a type mismatch.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
virtual ~ TDirectoryIterator ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
TDirectoryIterator & operator =(const TDirectoryIterator & right)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
- TDirectoryIterator ()
- TDirectoryIterator (const TDirectory & directory, const TPropertyIDSet & properties =kNoProperties, const TPropertyQuery & aQuery =kNoQuery)
- TDirectoryIterator (const TDirectoryIterator & copy)
- TDirectoryIterator (const TDirectory & directory, const TPropertyIDSet & properties, const TPropertyQuery & aQuery, bool beRecursive)
Interface Category:
API.
Purpose:
- Default constructor.
- Constructs an iterator to find entities that satisfy aQuery and to return their properties.
- Copy constructor.
- Constructs a recursive, depth-first iterator to find entities that satisfy aQuery and to return their properties.
Calling Context:
- Called by the stream-in operators, or directly for later assignment.
- Call this function directly.
- Called to copy an object.
- Called by derived classes.
Parameters:
- Takes no parameters.
- const TDirectory & directory -The directory to enumerate.
- const TPropertyIDSet & properties =kNoProperties -The properties to fill in for each item.
- const TPropertyQuery & aQuery =kNoQuery -Returns, in an enumeration, only items satisfying this query.
- const TDirectoryIterator & copy -The iterator to copy.
- const TDirectory & directory -the directory to enumerate.
- const TPropertyIDSet & properties -The properties to fill in for each item.
- const TPropertyQuery & aQuery -Returns, in an enumeration, only items satisfying this query.
- bool beRecursive -If set to true, recursively iterates subdirectories, depth first.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. This is a handle class.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.