kio Library API Documentation

kdirwatch.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1998 Sven Radej <sven@lisa.exp.univie.ac.at> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 #ifndef _KDIRWATCH_H 00019 #define _KDIRWATCH_H 00020 00021 #include <qtimer.h> 00022 #include <qdatetime.h> 00023 #include <qmap.h> 00024 00025 #define kdirwatch KDirWatch::self() 00026 00027 class KDirWatchPrivate; 00028 00061 class KDirWatch : public QObject 00062 { 00063 Q_OBJECT 00064 00065 public: 00074 KDirWatch (QObject* parent = 0, const char* name = 0); 00075 00081 ~KDirWatch(); 00082 00097 void addDir(const QString& path, 00098 bool watchFiles = false, bool recursive = false); 00099 00104 void addFile(const QString& file); 00105 00111 QDateTime ctime(const QString& path); 00112 00119 void removeDir(const QString& path); 00120 00127 void removeFile(const QString& file); 00128 00141 bool stopDirScan(const QString& path); 00142 00156 bool restartDirScan(const QString& path); 00157 00174 void startScan( bool notify=false, bool skippedToo=false ); 00175 00181 void stopScan(); 00182 00188 bool isStopped() { return _isStopped; } 00189 00195 bool contains( const QString& path ) const; 00196 00201 static void statistics(); 00202 00207 void setCreated( const QString &path ); 00212 void setDirty( const QString &path ); 00217 void setDeleted( const QString &path ); 00218 00219 enum Method { FAM, DNotify, Stat }; 00225 Method internalMethod(); 00226 00239 static KDirWatch* self(); 00246 static bool exists(); 00247 00248 signals: 00249 00263 void dirty (const QString &path); 00264 00269 void created (const QString &path ); 00270 00277 void deleted (const QString &path ); 00278 00279 private: 00280 bool _isStopped; 00281 00282 KDirWatchPrivate *d; 00283 static KDirWatch* s_pSelf; 00284 }; 00285 00286 #endif 00287 00288 // vim: sw=3 et
KDE Logo
This file is part of the documentation for kio Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:51 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003