18 #ifndef _KSIMPLEDIRWATCH_H
19 #define _KSIMPLEDIRWATCH_H
22 #include <tqdatetime.h>
25 #include <tdelibs_export.h>
27 #define kdirwatch KSimpleDirWatch::self()
29 class KSimpleDirWatchPrivate;
102 void addDir(
const TQString& path,
103 bool watchFiles =
false,
bool recursive =
false);
109 void addFile(
const TQString& file);
116 TQDateTime ctime(
const TQString& path);
124 void removeDir(
const TQString& path);
132 void removeFile(
const TQString& file);
146 bool stopDirScan(
const TQString& path);
161 bool restartDirScan(
const TQString& path);
179 void startScan(
bool notify=
false,
bool skippedToo=
false );
200 bool contains(
const TQString& path )
const;
206 static void statistics();
212 void setCreated(
const TQString &path );
217 void setDirty(
const TQString &path );
222 void setDeleted(
const TQString &path );
224 enum Method { FAM, DNotify, Stat, INotify };
230 Method internalMethod();
251 static bool exists();
287 KSimpleDirWatchPrivate *d;
KSimpleDirWatch is a basic copy of KDirWatch but with the TDEIO linking requirement removed.
void created(const TQString &path)
Emitted when a file or directory is created.
void deleted(const TQString &path)
Emitted when a file or directory is deleted.
bool isStopped()
Is scanning stopped? After creation of a KSimpleDirWatch instance, this is false.
void dirty(const TQString &path)
Emitted when a watched object is changed.