Skip to content

PythonQt.QtCore.QDirIterator · declarations 001

Back to PythonQt.QtCore.QDirIterator

FollowSymlinks: Any

IteratorFlag instance-attribute

IteratorFlag: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

IteratorFlags instance-attribute

IteratorFlags: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

NoIteratorFlags instance-attribute

NoIteratorFlags: Any

Subdirectories instance-attribute

Subdirectories: Any

fileInfo

fileInfo() -> Any

X.fileInfo() -> PythonQt.QtCore.QFileInfo

Supplemental documentation: Qt 5 reference:

QFileInfo QDirIterator::fileInfo() const

Returns a QFileInfo for the current directory entry.

See also filePath() and fileName().

Upstream PySide2 reference signatures (binding differences may apply):

fileInfo(self) -> PySide2.QtCore.QFileInfo

Source: https://doc.qt.io/archives/qt-5.15/qdiriterator.html#fileInfo

fileName

fileName() -> str

X.fileName() -> str

Supplemental documentation: Qt 5 reference:

QString QDirIterator::fileName() const

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().

Upstream PySide2 reference signatures (binding differences may apply):

fileName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qdiriterator.html#fileName

filePath

filePath() -> str

X.filePath() -> str

Supplemental documentation: Qt 5 reference:

QString QDirIterator::filePath() const

Returns the full file path for the current directory entry.

See also fileInfo() and fileName().

Upstream PySide2 reference signatures (binding differences may apply):

filePath(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qdiriterator.html#filePath

hasNext

hasNext() -> bool

X.hasNext() -> bool

Supplemental documentation: Qt 5 reference:

bool QDirIterator::hasNext() const

Returns true if there is at least one more entry in the directory; otherwise, false is returned.

See also next(), fileName(), filePath(), and fileInfo().

Upstream PySide2 reference signatures (binding differences may apply):

hasNext(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qdiriterator.html#hasNext

next

next() -> str

X.next() -> str

Supplemental documentation: Qt 5 reference:

QString QDirIterator::next()

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 an empty 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().

Upstream PySide2 reference signatures (binding differences may apply):

next(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qdiriterator.html#next

path

path() -> str

X.path() -> str

Supplemental documentation: Qt 5 reference:

QString QDirIterator::path() const

Returns the base directory of the iterator.

Upstream PySide2 reference signatures (binding differences may apply):

path(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qdiriterator.html#path