src/corelib/io/qabstractfileengine.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   816     ignored by the iterator subclass; QAbstractFileEngineIterator already
   816     ignored by the iterator subclass; QAbstractFileEngineIterator already
   817     provides the required filtering logics in the matchesFilters() function.
   817     provides the required filtering logics in the matchesFilters() function.
   818     You can call dirName() to get the directory name, nameFilters() to get a
   818     You can call dirName() to get the directory name, nameFilters() to get a
   819     stringlist of name filters, and filters() to get the entry filters.
   819     stringlist of name filters, and filters() to get the entry filters.
   820 
   820 
   821     The pure virual function hasNext() returns true if the current directory
   821     The pure virtual function hasNext() returns true if the current directory
   822     has at least one more entry (i.e., the directory name is valid and
   822     has at least one more entry (i.e., the directory name is valid and
   823     accessible, and we have not reached the end of the entry list), and false
   823     accessible, and we have not reached the end of the entry list), and false
   824     otherwise. Reimplement next() to seek to the next entry.
   824     otherwise. Reimplement next() to seek to the next entry.
   825 
   825 
   826     The pure virtual function currentFileName() returns the name of the
   826     The pure virtual function currentFileName() returns the name of the
   827     current entry without advancing the iterator. The currentFilePath()
   827     current entry without advancing the iterator. The currentFilePath()
   828     function is provided for convenience; it returns the full path of the
   828     function is provided for convenience; it returns the full path of the
   829     current entry.
   829     current entry.
   830 
   830 
   831     Here is an example of how to implement an interator that returns each of
   831     Here is an example of how to implement an iterator that returns each of
   832     three fixed entries in sequence.
   832     three fixed entries in sequence.
   833 
   833 
   834     \snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 3
   834     \snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 3
   835 
   835 
   836     Note: QAbstractFileEngineIterator does not deal with QDir::IteratorFlags;
   836     Note: QAbstractFileEngineIterator does not deal with QDir::IteratorFlags;
   957 }
   957 }
   958 
   958 
   959 /*!
   959 /*!
   960     The virtual function returns a QFileInfo for the current directory
   960     The virtual function returns a QFileInfo for the current directory
   961     entry. This function is provided for convenience. It can also be slightly
   961     entry. This function is provided for convenience. It can also be slightly
   962     faster that creating a QFileInfo object yourself, as the object returned
   962     faster than creating a QFileInfo object yourself, as the object returned
   963     by this function might contain cached information that QFileInfo otherwise
   963     by this function might contain cached information that QFileInfo otherwise
   964     would have to access through the file engine.
   964     would have to access through the file engine.
   965 
   965 
   966     \sa currentFileName()
   966     \sa currentFileName()
   967 */
   967 */