QCA::DirWatch Class Reference
QCA user API

`#include <QtCrypto>`

Collaboration diagram for QCA::DirWatch:
[legend]

## Signals

void | changed ()

## Public Member Functions

QString | dirName () const
| DirWatch (const QString &dir=QString(), QObject *parent=nullptr)
void | setDirName (const QString &dir)

## Friends

class | Private

## Detailed Description

Support class to monitor a directory for activity.

DirWatch monitors a specified file for any changes. When the directory changes, the changed() signal is emitted.

Note
  QFileSystemWatcher has very similar functionality to this class. You should evaluate this class and QFileSystemWatcher to determine which better suits your application needs.

## Constructor & Destructor Documentation

## DirWatch()

QCA::DirWatch::DirWatch | ( | const QString & | dir = QString(),
|  | QObject * | parent = nullptr )

explicit

Standard constructor.

Parameters

  dir | the name of the directory to watch. If not set in the constructor, you can set it using setDirName()
  parent | the parent object for this object

References DirWatch().

Referenced by changed(), and DirWatch().

## Member Function Documentation

## dirName()

QString QCA::DirWatch::dirName | ( |  | ) | const

The name of the directory that is being monitored.

## setDirName()

void QCA::DirWatch::setDirName | ( | const QString & | dir | ) |

Change the directory being monitored.

Parameters

  dir | the name of the directory to monitor

## changed

void QCA::DirWatch::changed | ( |  | ) |

signal

The changed signal is emitted when the directory is changed (e.g. modified by addition or deletion of a file within the directory, or the deletion of the directory).

References DirWatch().

The documentation for this class was generated from the following file:

- qca_support.h