22 #include <tqdatetime.h>
27 #include <tdelibs_export.h>
29 #define kdirwatch KDirWatch::self()
31 class 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);
124 void removeDir(
const TQString& path);
126 void removeDir(
const KURL& path);
134 void removeFile(
const TQString& file);
148 bool stopDirScan(
const TQString& path);
163 bool restartDirScan(
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();
255 static bool exists();
274 void dirty (
const KURL &url);
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.