Public Methods
- KFileReader ()
- KFileReader (const KURL& url, const QString& nameFilter= QString::null)
- ~KFileReader ()
- KFileReader & operator= (const QString& url)
- virtual void setURL (const KURL&)
- void setNameFilter (const QString&)
- uint dirCount () const
- uint count () const
- void listContents ()
- const KFileViewItemList * currentContents () const
- bool match (const QString& name) const
- bool isRoot () const
- bool isReadable () const
- void setShowHiddenFiles (bool b)
- bool showHiddenFiles () const
- virtual void setAutoUpdate ( bool b )
- bool autoUpdate () const
Signals
- void urlChanged (const QString&)
- void dirEntry (KFileViewItem *)
- void error (int, const QString&)
- void contents (const KFileViewItemList *, bool ready)
- void itemsDeleted (const KFileViewItemList *)
- void dirDeleted ()
- void filterChanged ()
Public Static Methods
Protected Methods
- void updateFiltered ()
- bool filterEntry (KFileViewItem *)
- void init ()
- virtual void getEntries ()
- virtual bool startLoading ()
Protected Slots
- void slotListEntry (int id, const KUDSEntry&)
- void slotIOFinished ()
- void slotIOError (int, int _errid, const char *_txt )
- void slotDirDirty (const QString& dir)
- void slotDirDeleted (const QString& dir)
- void slotDirUpdate ()
- void statLocalFiles ()
Protected Members
- KIOJob * myJob
- static KDirWatch * dirWatch
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.
[const]
Returns the number of directory entries expected.
[const]
Returns the number of directory entries read.
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]
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.
[const]
Returns true if the name matches the filter.
[const]
Indicates if the path is empty
[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.
[static]
Returns: whether KFileReader changes the current working directory
(via chdir()).
[signal]
Emitted when the url is changed. It is NOT emitted, when you manually
call setURL().
[signal]
Emitted when a directory entry that matches the filter is received.
[signal]
Emitted if a network transfer goes wrong.
[signal]
Emitted, if new files are queued
void slotListEntry (int id, const KUDSEntry&)
|
[protected slot]
Called when a directory entry is received.
[protected slot]
Called when KIOJob has finished the current network operation.
[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. |