• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

kdirwatch.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, 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 #include <kdelibs_export.h>
00026 
00027 #define kdirwatch KDirWatch::self()
00028 
00029 class KDirWatchPrivate;
00030 
00063 class KIO_EXPORT KDirWatch : public QObject
00064 {
00065   Q_OBJECT
00066     
00067   public:
00076    KDirWatch (QObject* parent = 0, const char* name = 0);
00077 
00083    ~KDirWatch();
00084 
00099    void addDir(const QString& path, 
00100            bool watchFiles = false, bool recursive = false);
00101 
00106    void addFile(const QString& file);
00107 
00113    QDateTime ctime(const QString& path);
00114 
00121    void removeDir(const QString& path);
00122 
00129    void removeFile(const QString& file);
00130 
00143    bool stopDirScan(const QString& path);
00144 
00158    bool restartDirScan(const QString& path);
00159 
00176    void startScan( bool notify=false, bool skippedToo=false );
00177 
00183    void stopScan();
00184 
00190    bool isStopped() { return _isStopped; }
00191 
00197    bool contains( const QString& path ) const;
00198 
00203    static void statistics();
00204 
00209    void setCreated( const QString &path );
00214    void setDirty( const QString &path );
00219    void setDeleted( const QString &path );
00220 
00221    enum Method { FAM, DNotify, Stat, INotify };
00227    Method internalMethod();
00228 
00241    static KDirWatch* self();
00248    static bool exists();
00249 
00250  signals:
00251 
00265    void dirty (const QString &path);
00266 
00271    void created (const QString &path );
00272      
00279    void deleted (const QString &path );
00280      
00281  private:
00282    bool _isStopped;
00283    
00284    KDirWatchPrivate *d;
00285    static KDirWatch* s_pSelf;
00286 };
00287 
00288 #endif
00289 
00290 // vim: sw=3 et

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal