Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
tdeio/tdeio
tdeio/tdeio
tdeio
tdeio
kdirwatch.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 _KDIRWATCH_H
19
#define _KDIRWATCH_H
20
21
#include <tqtimer.h>
22
#include <tqdatetime.h>
23
#include <tqmap.h>
24
25
#include <kurl.h>
26
27
#include <tdelibs_export.h>
28
29
#define kdirwatch KDirWatch::self()
30
31
class
KDirWatchPrivate;
32
65
class
TDEIO_EXPORT
KDirWatch
:
public
TQObject
66
{
67
Q_OBJECT
68
69
public
:
78
KDirWatch
(TQObject* parent = 0,
const
char
* name = 0);
79
85
~
KDirWatch
();
86
101
void
addDir(
const
TQString& path,
bool
watchFiles =
false
,
bool
recursive =
false
);
102
103
void
addDir(
const
KURL& url,
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
126
void
removeDir(
const
KURL& path);
127
134
void
removeFile(
const
TQString& file);
135
148
bool
stopDirScan(
const
TQString& path);
149
163
bool
restartDirScan(
const
TQString& path);
164
181
void
startScan(
bool
notify=
false
,
bool
skippedToo=
false
);
182
188
void
stopScan();
189
195
bool
isStopped
() {
return
_isStopped; }
196
202
bool
contains(
const
TQString& path )
const
;
203
208
static
void
statistics();
209
214
void
setCreated(
const
TQString &path );
219
void
setDirty(
const
TQString &path );
220
221
void
setDirty(
const
KURL &url );
226
void
setDeleted(
const
TQString &path );
227
228
enum
Method { FAM, DNotify, Stat, INotify };
234
Method internalMethod();
235
248
static
KDirWatch
*
self
();
255
static
bool
exists();
256
257
signals:
258
272
void
dirty (
const
TQString &path);
273
274
void
dirty (
const
KURL &url);
275
280
void
created (
const
TQString &path );
281
288
void
deleted (
const
TQString &path );
289
290
private
:
291
bool
_isStopped;
292
293
KDirWatchPrivate *d;
294
static
KDirWatch
* s_pSelf;
295
};
296
297
#endif
KDirWatch
Watch directories and files for changes.
Definition:
kdirwatch.h:65
KDirWatch::isStopped
bool isStopped()
Is scanning stopped? After creation of a KDirWatch instance, this is false.
Definition:
kdirwatch.h:195
tdeio/tdeio
Skip menu "tdeio/tdeio"
Main Page
Modules
Namespace List
Class Hierarchy
Alphabetical List
Class List
File List
Namespace Members
Class Members
Related Pages
tdeio/tdeio
Skip menu "tdeio/tdeio"
arts
dcop
dnssd
interfaces
kspeech
interface
library
tdetexteditor
kate
kded
kdoctools
kimgio
kjs
libtdemid
libtdescreensaver
tdecore
tdeabc
tdecmshell
tdecore
tdefx
tdehtml
tdeinit
tdeio
bookmarks
httpfilter
kpasswdserver
kssl
tdeioslave
http
tdefile
tdeio
tdeioexec
tdemdi
tdemdi
tdenewstuff
tdeparts
tdeprint
tderandr
tderesources
tdespell2
tdesu
tdeui
tdeunittest
tdeutils
tdewallet