• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • 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 <QtCore/QDateTime>
00022 #include <QtCore/QObject>
00023 #include <QtCore/QString>
00024 
00025 #include <kio/kio_export.h>
00026 
00027 class KDirWatchPrivate;
00028 
00062 class KIO_EXPORT KDirWatch : public QObject
00063 {
00064   Q_OBJECT
00065 
00066   public:
00067 
00071     enum WatchMode {
00072       WatchDirOnly = 0,  
00073       WatchFiles = 0x01, 
00074       WatchSubDirs = 0x02 
00075     };
00076     Q_DECLARE_FLAGS(WatchModes, WatchMode)
00077 
00078    
00085    KDirWatch (QObject* parent = 0);
00086 
00092    ~KDirWatch();
00093 
00113    void addDir(const QString& path, WatchModes watchModes = WatchDirOnly);
00114 
00120    void addFile(const QString& file);
00121 
00127    QDateTime ctime(const QString& path) const;
00128 
00135    void removeDir(const QString& path);
00136 
00143    void removeFile(const QString& file);
00144 
00157    bool stopDirScan(const QString& path);
00158 
00172    bool restartDirScan(const QString& path);
00173 
00190    void startScan( bool notify=false, bool skippedToo=false );
00191 
00197    void stopScan();
00198 
00204    bool isStopped();
00205 
00211    bool contains( const QString& path ) const;
00212 
00217    static void statistics();
00218 
00219    enum Method { FAM, INotify, DNotify, Stat };
00224    Method internalMethod();
00225 
00238    static KDirWatch* self();
00244    static bool exists();
00245 
00246 public Q_SLOTS: 
00247 
00252    void setCreated( const QString &path );
00253     
00258    void setDirty( const QString &path );
00259 
00264    void setDeleted( const QString &path );
00265 
00266  Q_SIGNALS:
00267 
00281    void dirty (const QString &path);
00282 
00287    void created (const QString &path );
00288 
00295    void deleted (const QString &path );
00296 
00297  private:
00298    KDirWatchPrivate *const d;
00299 };
00300 
00301 Q_DECLARE_OPERATORS_FOR_FLAGS(KDirWatch::WatchModes)
00302 
00303 #endif
00304 
00305 // vim: sw=3 et

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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