#include <Dir.h++>

Public Member Functions | |
| Dir (const String &path) | |
| Construct a new Dir object for the given path. | |
| ~Dir () throw () | |
| Destructor. | |
| void | open (bool listHidden=false, bool listDot=false) throw (IOException) |
| Open the directory. | |
| void | close () throw () |
| Close the directory. | |
| void | rewind () throw (IOException) |
| Rewind the directory. | |
| bool | isOpen () const throw () |
| Test if the directory is currently open. | |
| bool | nextFile (String &name, FileAttributes &attrib, bool fetchPermissions=false) |
| Retrieve the next file from the directory. | |
The class provides a means of enumerating through the files in a directory.
| ~Dir | ( | ) | throw () |
Destructor.
| void close | ( | ) | throw () |
Close the directory.
If the directory is already closed, the method has no effect.
| bool isOpen | ( | ) | const throw () [inline] |
Test if the directory is currently open.
| bool nextFile | ( | String & | name, | |
| FileAttributes & | attrib, | |||
| bool | fetchPermissions = false | |||
| ) |
Retrieve the next file from the directory.
| name | The String in which to place the file's name. | |
| attrib | The FileAttributes object in which to place the file's attributes. | |
| fetchPermissions | A flag indicating whether the file permissions should be fetched for the file. This is a very slow operation on Windows, hence by default this option is disabled. On POSIX systems, this flag is ignored because fetching the file permissions has no overhead. |
| void open | ( | bool | listHidden = false, |
|
| bool | listDot = false | |||
| ) | throw (IOException) |
Open the directory.
If the directory is already open, the method has no effect.
| listHidden | A flag indicating whether hidden files (as defined for the host platform) should be listed or ignored. | |
| listDot | A flag indicating whether the files '.' and '..' should be listed or ignored. |
| IOException | If the directory could not be opened. |
| void rewind | ( | ) | throw (IOException) |
Rewind the directory.
On some platforms this entails closing and re-opening the directory.
| IOException | If the directory could not be rewound. |
1.5.9