class KFileReader


Definition#include <kfilereader.h>
InheritsKURL (kdecore), QObject (kdecore)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Public Static Methods

Protected Methods

Protected Slots

Protected Members

void setURL (const KURL&)
[virtual]

Set the current url. An url without a protocol (file:/, ftp://) will be treated as a local directory and file:/ will be prepended.

void setNameFilter (const QString&)

Set the current name filter.

uint dirCount ()
[const]

Returns the number of directory entries expected.

uint count ()
[const]

Returns the number of directory entries read.

void listContents ()

Initiates reading the current directory or url. Returns the contents as a list of KFileViewItem objects matching the specified filter by emitting the signal contents. If we are working on a local directory this will be a blocking readdir(). If we are working on a remote url, we use KIO to list the contents. The contents() signal may be emitted more than once to supply you with KFileViewItems, up until the signal finished is emitted (and isFinished() returns true). If the contents are already cached, you will get the entire contents with just one contents() signal.

const KFileViewItemList * currentContents ()
[const]

This gives you access to the current list of items. It is not guaranteed that this list is complete (e.g. during asynchronous reading of remote directories. Use only if really necessary. Normally, you should just use listContents and get the list via the signal contents. Never returns 0L.

bool match (const QString& name)
[const]

Returns true if the name matches the filter.

bool isRoot ()
[const]

Indicates if the path is empty

bool isReadable ()
[const]

Indicates if the path is readable. That means, if there are entries to expect

void setAutoUpdate ( bool b )
[virtual]

Enables/disables automatic updates, when a directory is changed (works only for local files, using KDirWatch). New files will be emitted via newFilesArrived, deleted files with filesDeleted Default is enabled.

void setEnableChdir ( bool enable )
[static]

KFileReader uses chhdir() to change the current working directory to increase performance. If you don't like this, disable it. Default is enabled.

bool isChdirEnabled ()
[static]

Returns: whether KFileReader changes the current working directory (via chdir()).

void urlChanged (const QString&)
[signal]

Emitted when the url is changed. It is NOT emitted, when you manually call setURL().

void dirEntry (KFileViewItem *)
[signal]

Emitted when a directory entry that matches the filter is received.

void error (int, const QString&)
[signal]

Emitted if a network transfer goes wrong.

void contents (const KFileViewItemList *, bool ready)
[signal]

Emitted, if new files are queued

void slotListEntry (int id, const KUDSEntry&)
[protected slot]

Called when a directory entry is received.

void slotIOFinished ()
[protected slot]

Called when KIOJob has finished the current network operation.

bool startLoading ()
[protected virtual]

Start listing the directory in the background (returns immeditately).

Returns: true if KIOJob was started successfully.


Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:34 2000, using kdoc 2.0a33.