22 #include <tqdatetime.h>
25 #include <kdelibs_export.h>
27 #define kdirwatch KDirWatch::self()
29 class KDirWatchPrivate;
76 KDirWatch (TQObject* parent = 0,
const char* name = 0);
99 void addDir(
const TQString& path,
100 bool watchFiles =
false,
bool recursive =
false);
106 void addFile(
const TQString& file);
113 TQDateTime ctime(
const TQString& path);
121 void removeDir(
const TQString& path);
129 void removeFile(
const TQString& file);
143 bool stopDirScan(
const TQString& path);
158 bool restartDirScan(
const TQString& path);
176 void startScan(
bool notify=
false,
bool skippedToo=
false );
197 bool contains(
const TQString& path )
const;
203 static void statistics();
209 void setCreated(
const TQString &path );
214 void setDirty(
const TQString &path );
219 void setDeleted(
const TQString &path );
221 enum Method { FAM, DNotify, Stat, INotify };
227 Method internalMethod();
248 static bool exists();
Watch directories and files for changes.
void created(const TQString &path)
Emitted when a file or directory is created.
bool isStopped()
Is scanning stopped? After creation of a KDirWatch instance, this is false.
void deleted(const TQString &path)
Emitted when a file or directory is deleted.
void dirty(const TQString &path)
Emitted when a watched object is changed.