• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
ksimpledirwatch.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1998 Sven Radej <sven@lisa.exp.univie.ac.at>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef _KSIMPLEDIRWATCH_H
19 #define _KSIMPLEDIRWATCH_H
20 
21 #include <tqtimer.h>
22 #include <tqdatetime.h>
23 #include <tqmap.h>
24 
25 #include <tdelibs_export.h>
26 
27 #define kdirwatch KSimpleDirWatch::self()
28 
29 class KSimpleDirWatchPrivate;
30 
66 class TDEIO_EXPORT KSimpleDirWatch : public TQObject
67 {
68  TQ_OBJECT
69 
70  public:
79  KSimpleDirWatch (TQObject* parent = 0, const char* name = 0);
80 
86  ~KSimpleDirWatch();
87 
102  void addDir(const TQString& path,
103  bool watchFiles = false, bool recursive = false);
104 
109  void addFile(const TQString& file);
110 
116  TQDateTime ctime(const TQString& path);
117 
124  void removeDir(const TQString& path);
125 
132  void removeFile(const TQString& file);
133 
146  bool stopDirScan(const TQString& path);
147 
161  bool restartDirScan(const TQString& path);
162 
179  void startScan( bool notify=false, bool skippedToo=false );
180 
186  void stopScan();
187 
193  bool isStopped() { return _isStopped; }
194 
200  bool contains( const TQString& path ) const;
201 
206  static void statistics();
207 
212  void setCreated( const TQString &path );
217  void setDirty( const TQString &path );
222  void setDeleted( const TQString &path );
223 
224  enum Method { FAM, DNotify, Stat, INotify };
230  Method internalMethod();
231 
244  static KSimpleDirWatch* self();
251  static bool exists();
252 
253  signals:
254 
268  void dirty (const TQString &path);
269 
274  void created (const TQString &path );
275 
282  void deleted (const TQString &path );
283 
284  private:
285  bool _isStopped;
286 
287  KSimpleDirWatchPrivate *d;
288  static KSimpleDirWatch* s_pSelf;
289 };
290 
291 #endif
KSimpleDirWatch
KSimpleDirWatch is a basic copy of KDirWatch but with the TDEIO linking requirement removed.
Definition: ksimpledirwatch.h:67
KSimpleDirWatch::created
void created(const TQString &path)
Emitted when a file or directory is created.
KSimpleDirWatch::deleted
void deleted(const TQString &path)
Emitted when a file or directory is deleted.
KSimpleDirWatch::isStopped
bool isStopped()
Is scanning stopped? After creation of a KSimpleDirWatch instance, this is false.
Definition: ksimpledirwatch.h:193
KSimpleDirWatch::dirty
void dirty(const TQString &path)
Emitted when a watched object is changed.

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.1
This website is maintained by Timothy Pearson.