diff options
Diffstat (limited to 'src/3rdParty/efsw/WatcherInotify.cpp')
-rwxr-xr-x | src/3rdParty/efsw/WatcherInotify.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/WatcherInotify.cpp b/src/3rdParty/efsw/WatcherInotify.cpp new file mode 100755 index 0000000..7259bb1 --- /dev/null +++ b/src/3rdParty/efsw/WatcherInotify.cpp | |||
@@ -0,0 +1,25 @@ | |||
1 | #include <efsw/WatcherInotify.hpp> | ||
2 | |||
3 | namespace efsw { | ||
4 | |||
5 | WatcherInotify::WatcherInotify() : Watcher(), Parent( NULL ) {} | ||
6 | |||
7 | WatcherInotify::WatcherInotify( WatchID id, std::string directory, FileWatchListener* listener, | ||
8 | bool recursive, WatcherInotify* parent ) : | ||
9 | Watcher( id, directory, listener, recursive ), Parent( parent ), DirInfo( directory ) {} | ||
10 | |||
11 | bool WatcherInotify::inParentTree( WatcherInotify* parent ) { | ||
12 | WatcherInotify* tNext = Parent; | ||
13 | |||
14 | while ( NULL != tNext ) { | ||
15 | if ( tNext == parent ) { | ||
16 | return true; | ||
17 | } | ||
18 | |||
19 | tNext = tNext->Parent; | ||
20 | } | ||
21 | |||
22 | return false; | ||
23 | } | ||
24 | |||
25 | } // namespace efsw | ||