31 LOG(
DEBUG) <<
"WsFsTreeUpdater::~WsFsTreeUpdater() : Freeing memory completed";
36 LOG(
DEBUG) <<
"WsFsTreeUpdater::getLastTree() : Getting LastTree";
37 boost::mutex::scoped_lock lock(
m_lMutex);
49 LOG(
DEBUG) <<
"WsFileSystemTree::update() : Updating FsTree";
66 LOG(
INFO) <<
"WsFsTreeUpdater::update() : Launching monitor";
80 LOG(
DEBUG) <<
"WsFsTreeUpdater::update() : Update already in progress";
104 LOG(
INFO) <<
"WsFsTreeUpdater::startRegularUpdate() : Monitoring is on. Will update the tree every " <<
m_delay <<
" s.";
109 temp = boost::filesystem::path(temp).string();
110 ifstream fconf(temp.c_str());
Represents the file structure on disk.
boost::mutex m_updateMutex
int start()
crawls the diretory and sorts the children. It is called by WsDirectoryCrawler::start() ...
bool m_isMonitor
Use Gamin or no.
Monitors the filesystem and call the WsFsTreeUpdater::update() method accordignly.
int update()
update the fsTree
std::string m_rootPath
RootPath.
FileSystemTreePtr m_fsTree
FileSystemTreePtr getLastTree()
returns the last created tree
int startRegularUpdate()
Starts the regular update of the tree.
boost::shared_ptr< WsFileSystemTree > FileSystemTreePtr
int threadUpdate()
Updates the tree in a thread.
WsAbstractMonitor * m_monitor
Pointer to the file monitoring class used.
std::string get(const std::string §ion, const std::string &id, const std::string &def)
unsigned int m_delay
Delay after which the FileSystemTree will be updated if changed occured.
const std::string PathToLockFile
WsFsTreeUpdater(const std::string &p, unsigned int delay, bool m=false)
constrictor
static WsGlobalProperties * instance()
virtual boost::thread * start()=0
starts the monitoring process
Updates the tree and takes care of unconsistencies with the user.
Monitors the FileSystem for any modification.
bool isLastVersion(FileSystemTreePtr fs)
checks whether the fs is the last version
std::vector< boost::filesystem::path > & getMonitorPaths()
returns the std::vector containing the boost::filesystem::path that should be monitored by the WsUpda...