Main MRPT website > C++ reference for MRPT 1.9.9
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 30 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 63 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_, m_watchedDirectory, MRPT_END, MRPT_START, and THROW_EXCEPTION.

◆ ~CFileSystemWatcher()

CFileSystemWatcher::~CFileSystemWatcher ( )
virtual

Destructor.

Definition at line 90 of file CFileSystemWatcher.cpp.

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 82 of file CFileSystemWatcher.h.

Referenced by CFileSystemWatcher(), and getChanges().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019