22#include <tqdatetime.h>
27#include <tdelibs_export.h>
29#define kdirwatch KDirWatch::self()
31class KDirWatchPrivate;
78 KDirWatch (TQObject* parent = 0,
const char* name = 0);
101 void addDir(
const TQString& path,
bool watchFiles =
false,
bool recursive =
false);
103 void addDir(
const KURL& url,
bool watchFiles =
false,
bool recursive =
false);
109 void addFile(
const TQString& file);
116 TQDateTime
ctime(
const TQString& path);
181 void startScan(
bool notify=
false,
bool skippedToo=
false );
202 bool contains(
const TQString& path )
const;
208 static void statistics();
214 void setCreated(
const TQString &path );
219 void setDirty(
const TQString &path );
221 void setDirty(
const KURL &url );
226 void setDeleted(
const TQString &path );
228 enum Method { FAM, DNotify, Stat, INotify };
234 Method internalMethod();
248 static KDirWatch* self();
255 static bool exists();
274 void dirty (
const KURL &url);
void created(const TQString &path)
Emitted when a file or directory is created.
void stopScan()
Stops scanning of all directories in internal list.
TQDateTime ctime(const TQString &path)
Returns the time the directory/file was last changed.
bool restartDirScan(const TQString &path)
Restarts scanning for specified path.
void removeDir(const TQString &path)
Removes a directory from the list of scanned directories.
bool stopDirScan(const TQString &path)
Stops scanning the specified path.
void startScan(bool notify=false, bool skippedToo=false)
Starts scanning of all dirs in list.
void addFile(const TQString &file)
Adds a file to be watched.
bool isStopped()
Is scanning stopped?
void removeFile(const TQString &file)
Removes a file from the list of watched files.
void deleted(const TQString &path)
Emitted when a file or directory is deleted.
void addDir(const TQString &path, bool watchFiles=false, bool recursive=false)
Adds a directory to be watched.
KDirWatch(TQObject *parent=0, const char *name=0)
Constructor.
void dirty(const TQString &path)
Emitted when a watched object is changed.