TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
UpdateListener Class Reference

Processes a file action. More...

Public Member Functions

 UpdateListener ()
 
std::string getActionName (efsw::Action action)
 
void handleFileAction (efsw::WatchID watchid, const std::string &dir, const std::string &filename, efsw::Action action, std::string oldFilename="")
 

Detailed Description

Processes a file action.

Constructor & Destructor Documentation

UpdateListener::UpdateListener ( )
inline
19 {}

Member Function Documentation

std::string UpdateListener::getActionName ( efsw::Action  action)
inline
22  {
23  switch ( action )
24  {
25  case efsw::Actions::Add: return "Add";
26  case efsw::Actions::Modified: return "Modified";
27  case efsw::Actions::Delete: return "Delete";
28  case efsw::Actions::Moved: return "Moved";
29  default: return "Bad Action";
30  }
31  }

+ Here is the caller graph for this function:

void UpdateListener::handleFileAction ( efsw::WatchID  watchid,
const std::string &  dir,
const std::string &  filename,
efsw::Action  action,
std::string  oldFilename = "" 
)
inline
34  {
35  std::cout << "DIR (" << dir + ") FILE (" + ( oldFilename.empty() ? "" : "from file " + oldFilename + " to " ) + filename + ") has event " << getActionName( action ) << std::endl;
36  }
std::string getActionName(efsw::Action action)
Definition: efsw-test.cpp:21

+ Here is the call graph for this function:


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