Main MRPT website > C++ reference for MRPT 1.5.7
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
mrpt::system::CFileSystemWatcher Class Reference

Detailed Description

This class subscribes to notifications of file system changes, thus it can be used to efficiently stay informed about changes in a directory tree.

Definition at line 28 of file CFileSystemWatcher.h.

#include <mrpt/system/CFileSystemWatcher.h>

Classes

struct  TFileSystemChange
 Each of the changes detected by utils::CFileSystemWatcher. More...
 

Public Types

typedef std::deque< TFileSystemChangeTFileSystemChangeList
 

Public Member Functions

 CFileSystemWatcher (const std::string &path)
 Creates the subscription to a specified path. More...
 
virtual ~CFileSystemWatcher ()
 Destructor. More...
 
void getChanges (TFileSystemChangeList &out_list)
 Call this method sometimes to get the list of changes in the watched directory. More...
 

Private Attributes

std::string m_watchedDirectory
 Ended in "/". More...
 

Member Typedef Documentation

◆ TFileSystemChangeList

Definition at line 53 of file CFileSystemWatcher.h.

Constructor & Destructor Documentation

◆ CFileSystemWatcher()

CFileSystemWatcher::CFileSystemWatcher ( const std::string path)

Creates the subscription to a specified path.

Parameters
pathThe file or directory to watch.

Definition at line 41 of file CFileSystemWatcher.cpp.

References ASSERT_, mrpt::system::createThreadFromObjectMethod(), m_watchedDirectory, MRPT_END, MRPT_START, and THROW_EXCEPTION.

◆ ~CFileSystemWatcher()

CFileSystemWatcher::~CFileSystemWatcher ( )
virtual

Destructor.

Definition at line 97 of file CFileSystemWatcher.cpp.

References mrpt::system::terminateThread().

Member Function Documentation

◆ getChanges()

void CFileSystemWatcher::getChanges ( TFileSystemChangeList out_list)

Member Data Documentation

◆ m_watchedDirectory

std::string mrpt::system::CFileSystemWatcher::m_watchedDirectory
private

Ended in "/".

Definition at line 70 of file CFileSystemWatcher.h.

Referenced by CFileSystemWatcher(), and getChanges().




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019