Index | | | Related pages | | | Classes | | | Functions | | | Entities | | | Function Sets | | | Groups |
class Directory
Special iterator to access directory listings. more...
Methods | |
close | Closes the directory object. |
error | Returns the last system error code that the directory operation causes. |
read | Returns the next entry in the directory. |
The Directory class is used by DirectoryOpen() function to return an object that the user can iterate upon. It should not be created directly, but only through (undefined) DirectoryOpen .
The caller should repeatedly call the read() method until nil is returned. In case an error is raised, the error() method may be called to get informations on the cause that raised the error.
After the read is complete, the caller should call close() to free the resources associated with the object. The garbage collector will eventually take care of it, but it is better to close the object as soon as possible.
Closes the directory object.
Directory.close( ) |
This method should be called when the item is not needed anymore to free system resources.
However, the directory listing is closed at garbage collecting.
Returns the last system error code that the directory operation causes.
Directory.error( ) | |
Returns: | A system error code. |
The error code may be rendered into a string using the systemErrorDescription function.
Returns the next entry in the directory.
Directory.read( ) | |
Returns: | A string representing the next entry, or nil when no new entries are left. |
Index | | | Related pages | | | Classes | | | Functions | | | Entities | | | Function Sets | | | Groups |