QCA::FileWatch Class Reference
QCA user API

`#include <QtCrypto>`

Collaboration diagram for QCA::FileWatch:
[legend]

## Signals

void | changed ()

## Public Member Functions

QString | fileName () const
| FileWatch (const QString &file=QString(), QObject *parent=nullptr)
void | setFileName (const QString &file)

## Friends

class | Private

## Detailed Description

Support class to monitor a file for activity.

FileWatch monitors a specified file for any changes. When the file 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

## FileWatch()

QCA::FileWatch::FileWatch | ( | const QString & | file = QString(),
|  | QObject * | parent = nullptr )

explicit

Standard constructor.

Parameters

  file | the name of the file to watch. If not in this object, you can set it using setFileName()
  parent | the parent object for this object

References FileWatch().

Referenced by changed(), and FileWatch().

## Member Function Documentation

## fileName()

QString QCA::FileWatch::fileName | ( |  | ) | const

The name of the file that is being monitored.

## setFileName()

void QCA::FileWatch::setFileName | ( | const QString & | file | ) |

Change the file being monitored.

Parameters

  file | the name of the file to monitor

## changed

void QCA::FileWatch::changed | ( |  | ) |

signal

The changed signal is emitted when the file is changed (e.g.

modified, deleted)

References FileWatch().

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

- qca_support.h