diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:15:16 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:15:16 +0200 |
commit | bd6336c629841c6db3a6ca53a936d629d34db53b (patch) | |
tree | 3721ef997864108df175ce677a8a7d4342a6f1d2 /shared/dir_watcher.h | |
parent | 4.0 (diff) | |
download | FreeFileSync-bd6336c629841c6db3a6ca53a936d629d34db53b.tar.gz FreeFileSync-bd6336c629841c6db3a6ca53a936d629d34db53b.tar.bz2 FreeFileSync-bd6336c629841c6db3a6ca53a936d629d34db53b.zip |
4.1
Diffstat (limited to 'shared/dir_watcher.h')
-rw-r--r-- | shared/dir_watcher.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/shared/dir_watcher.h b/shared/dir_watcher.h deleted file mode 100644 index c2bab1d5..00000000 --- a/shared/dir_watcher.h +++ /dev/null @@ -1,50 +0,0 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * -// ************************************************************************** - -#ifndef DIR_WATCHER_348577025748023458 -#define DIR_WATCHER_348577025748023458 - -#include "file_error.h" -#include <vector> -#include <memory> - -namespace zen -{ -//Windows: ReadDirectoryChangesW http://msdn.microsoft.com/en-us/library/aa365465(v=vs.85).aspx -//Linux: inotify http://linux.die.net/man/7/inotify - -//watch directory including subdirectories -/* -!Note handling of directories!: - Linux: newly added subdirectories are reported but not automatically added for watching! -> reset Dirwatcher! - removal of top watched directory is NOT notified! - Windows: removal of top watched directory also NOT notified (e.g. brute force usb stick removal) - however manual unmount IS notified (e.g. usb stick removal, then re-insert), but watching is stopped! - Renaming of top watched directory handled incorrectly: Not notified(!) + changes in subfolders - report FILE_ACTION_MODIFIED for directory (check that should prevent this fails!) - - Overcome all issues portably: check existence of watched directory externally + reinstall watch after changes in directory structure (added directories) are possible -*/ -class DirWatcher -{ -public: - DirWatcher(const Zstring& directory); //throw FileError - ~DirWatcher(); - - //extract accumulated changes since last call - std::vector<Zstring> getChanges(); //throw FileError - -private: - DirWatcher(const DirWatcher&); - DirWatcher& operator=(const DirWatcher&); - - struct Pimpl; - std::unique_ptr<Pimpl> pimpl_; -}; - -} - -#endif |