QDirIterator Class Reference |
Constant | Value | Description |
---|---|---|
QDirIterator::NoIteratorFlags | 0x0 | The default value, representing no flags. The iterator will return entries for the assigned path. |
QDirIterator::Subdirectories | 0x2 | List entries inside all subdirectories as well. |
QDirIterator::FollowSymlinks | 0x1 | When combined with Subdirectories, this flag enables iterating through all subdirectories of the assigned path, following all symbolic links. Symbolic link loops (e.g., "link" => "." or "link" => "..") are automatically detected and ignored. |
The IteratorFlags type is a typedef for QFlags<IteratorFlag>. It stores an OR combination of IteratorFlag values.
Constructs a QDirIterator that can iterate over dir's entrylist, using dir's name filters and regular filters. You can pass options via flags to decide how the directory should be iterated.
By default, flags is NoIteratorFlags, which provides the same behavior as in QDir::entryList().
The sorting in dir is ignored.
Note: To list symlinks that point to non existing files, QDir::System must be passed to the flags.
See also hasNext(), next(), and IteratorFlags.
Constructs a QDirIterator that can iterate over path. You can pass options via flags to decide how the directory should be iterated.
By default, flags is NoIteratorFlags, which provides the same behavior as in QDir::entryList().
Note: To list symlinks that point to non existing files, QDir::System must be passed to the flags.
See also hasNext(), next(), and IteratorFlags.
Constructs a QDirIterator that can iterate over path, with no name filtering and filters for entry filtering. You can pass options via flags to decide how the directory should be iterated.
By default, filters is QDir::NoFilter, and flags is NoIteratorFlags, which provides the same behavior as in QDir::entryList().
Note: To list symlinks that point to non existing files, QDir::System must be passed to the flags.
Warning: This constructor expects flags to be left at its default value. Use the constructors that do not take the filters argument instead.
See also hasNext(), next(), and IteratorFlags.
Constructs a QDirIterator that can iterate over path, using nameFilters and filters. You can pass options via flags to decide how the directory should be iterated.
By default, flags is NoIteratorFlags, which provides the same behavior as QDir::entryList().
Note: To list symlinks that point to non existing files, QDir::System must be passed to the flags.
Warning: This constructor expects flags to be left at its default value. Use the constructors that do not take the filters argument instead.
See also hasNext(), next(), and IteratorFlags.
Destroys the QDirIterator.
Returns a QFileInfo for the current directory entry.
See also filePath() and fileName().
Returns the file name for the current directory entry, without the path prepended.
This function is convenient when iterating a single directory. When using the QDirIterator::Subdirectories flag, you can use filePath() to get the full path.
See also filePath() and fileInfo().
Returns the full file path for the current directory entry.
See also fileInfo() and fileName().
Returns true if there is at least one more entry in the directory; otherwise, false is returned.
See also next(), fileName(), filePath(), and fileInfo().
Advances the iterator to the next entry, and returns the file path of this new entry. If hasNext() returns false, this function does nothing, and returns a null QString.
You can call fileName() or filePath() to get the current entry file name or path, or fileInfo() to get a QFileInfo for the current entry.
See also hasNext(), fileName(), filePath(), and fileInfo().
Returns the base directory of the iterator.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.5 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com