org.kde.koala
public class KDirWatch extends QObject
See Also: KDirWatch
UNKNOWN: Class for watching directory and file changes.
Field Summary | |
---|---|
static int | DNotify |
static int | FAM |
static int | Stat |
Constructor Summary | |
---|---|
protected | KDirWatch(Class dummy) |
KDirWatch(QObject parent, String name)
Constructor.
| |
KDirWatch(QObject parent) | |
KDirWatch() |
Method Summary | |
---|---|
void | addDir(String path, boolean watchFiles, boolean recursive)
Adds a directory to be watched.
|
void | addDir(String path, boolean watchFiles) |
void | addDir(String path) |
void | addFile(String file)
Adds a file to be watched. |
String | className() |
boolean | contains(String path)
Check if a directory is being watched by this KDirWatch instance |
Calendar | ctime(String path)
Returns the time the directory/file was last changed. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
static boolean | exists()
Returns true if there is an instance of KDirWatch. |
protected void | finalize() Deletes the wrapped C++ instance |
int | internalMethod()
Returns the preferred internal method to
watch for changes. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
boolean | isStopped()
Is scanning stopped?
|
QMetaObject | metaObject() |
void | removeDir(String path)
Removes a directory from the list of scanned directories.
|
void | removeFile(String file)
Removes a file from the list of watched files.
|
boolean | restartDirScan(String path)
Restarts scanning for specified path.
|
static KDirWatch | self()
The KDirWatch instance usually globally used in an application.
|
void | setCreated(String path)
Emits created(). |
void | setDeleted(String path)
Emits deleted(). |
void | setDirty(String path)
Emits dirty(). |
void | startScan(boolean notify, boolean skippedToo)
Starts scanning of all dirs in list. |
void | startScan(boolean notify) |
void | startScan() |
static void | statistics()
Dump statistic information about all KDirWatch instances.
|
boolean | stopDirScan(String path)
Stops scanning the specified path.
|
void | stopScan()
Stops scanning of all directories in internal list.
|
Parameters: parent the parent of the QObject (or 0 for parent-less KDataTools) name the name of the QObject, can be 0
UNKNOWN: Constructor.
watchFiles
is
false (the default), the signals dirty(), created(), deleted()
can be emitted, all for the watched directory.
When watchFiles
is true, all files in the watched directory
are watched for changes, too. Thus, the signals dirty(),
created(), deleted() can be emitted.Parameters: path the path to watch watchFiles if true, the KDirWatch will also watch files - NOT IMPLEMENTED YET recursive if true, all sub directories are also watched - NOT IMPLEMENTED YET
UNKNOWN: Adds a directory to be watched.
Parameters: file the file to watch
UNKNOWN: Adds a file to be watched.
Parameters: path the directory to check
Returns: true if the directory is being watched
UNKNOWN: Check if a directory is being watched by this KDirWatch instance
Parameters: path the file to check
Returns: the date of the last modification
UNKNOWN: Returns the time the directory/file was last changed.
Returns: true if there is an instance of KDirWatch.
See Also: KDirWatch
UNKNOWN: Returns true if there is an instance of KDirWatch.
UNKNOWN: Returns the preferred internal method to watch for changes.
Returns: true when scanning stopped
UNKNOWN: Is scanning stopped? After creation of a KDirWatch instance, this is false.
Parameters: path the path of the dir to be removed from the list
UNKNOWN: Removes a directory from the list of scanned directories.
Parameters: file the file to be removed from the list
UNKNOWN: Removes a file from the list of watched files.
Parameters: path the path to restart scanning
Returns: true if the path
is being watched, otherwise false
See Also: KDirWatch
UNKNOWN: Restarts scanning for specified path.
Returns: a KDirWatch instance
UNKNOWN: The KDirWatch instance usually globally used in an application.
Parameters: path the path of the file or directory
UNKNOWN: Emits created().
Parameters: path the path of the file or directory
UNKNOWN: Emits deleted().
Parameters: path the path of the file or directory
UNKNOWN: Emits dirty().
Parameters: notify If true, all changed directories (since
stopScan() call) will be notified for refresh. If notify is
false, all ctimes will be reset (except those who are stopped,
but only if skippedToo
is false) and changed dirs won't be
notified. You can start scanning even if the list is
empty. First call should be called with false
or else all
directories
in list will be notified. skippedToo if true, the skipped directoris (scanning of which was
stopped with stopDirScan() ) will be reset and notified
for change. Otherwise, stopped directories will continue to be
unnotified.
UNKNOWN: Starts scanning of all dirs in list.
UNKNOWN: Dump statistic information about all KDirWatch instances.
path
is not deleted from the interal just, it is just skipped.
Call this function when you perform an huge operation
on this directory (copy/move big files or many files). When finished,
call restartDirScan(path).Parameters: path the path to skip
Returns: true if the path
is being watched, otherwise false
See Also: KDirWatch
UNKNOWN: Stops scanning the specified path.
UNKNOWN: Stops scanning of all directories in internal list.