KIO::ListJob Class

Header: #include <KIO/ListJob>
CMake: find_package(KF6 REQUIRED COMPONENTS KIO)
target_link_libraries(mytarget PRIVATE KF6::KIOCore)
Inherits: KIO::SimpleJob

Public Types

flags ListFlags

Public Functions

const QUrl &redirectionUrl() const
void setUnrestricted(bool unrestricted)

Signals

void entries(KIO::Job *job, const KIO::UDSEntryList &list)
void permanentRedirection(KIO::Job *job, const QUrl &fromUrl, const QUrl &toUrl)
void redirection(KIO::Job *job, const QUrl &url)
void subError(KIO::ListJob *job, KIO::ListJob *subJob)

Detailed Description

A ListJob is allows you to get the get the content of a directory. Don't create the job directly, but use KIO::listRecursive() or KIO::listDir() instead.

See also KIO::listRecursive() and KIO::listDir().

Member Function Documentation

[signal] void ListJob::entries(KIO::Job *job, const KIO::UDSEntryList &list)

This signal emits the entry found by the job while listing. The progress signals aren't specific to ListJob. It simply uses SimpleJob's processedSize (number of entries listed) and totalSize (total number of entries, if known), as well as percent. @param job the job that emitted this signal @param list the list of UDSEntries

[signal] void ListJob::permanentRedirection(KIO::Job *job, const QUrl &fromUrl, const QUrl &toUrl)

Signals a permanent redirection. The redirection itself is handled internally. @param job the job that emitted this signal @param fromUrl the original URL @param toUrl the new URL

[signal] void ListJob::redirection(KIO::Job *job, const QUrl &url)

Signals a redirection. Use to update the URL shown to the user. The redirection itself is handled internally. @param job the job that is redirected @param url the new url

const QUrl &ListJob::redirectionUrl() const

Returns the ListJob's redirection URL. This will be invalid if there was no redirection. @return the redirection url

void ListJob::setUnrestricted(bool unrestricted)

Do not apply any KIOSK restrictions to this job.

[signal] void ListJob::subError(KIO::ListJob *job, KIO::ListJob *subJob)

This signal is emitted when a sub-directory could not be listed. The job keeps going, thus doesn't result in an overall error. @param job the job that emitted the signal @param subJob the job listing a sub-directory, which failed. Use url(), error() and errorText() on that job to find out more.