diff options
Diffstat (limited to 'src/3rdParty/efsw/FileWatcherImpl.cpp')
-rwxr-xr-x | src/3rdParty/efsw/FileWatcherImpl.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/FileWatcherImpl.cpp b/src/3rdParty/efsw/FileWatcherImpl.cpp new file mode 100755 index 0000000..f6b86a5 --- /dev/null +++ b/src/3rdParty/efsw/FileWatcherImpl.cpp | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <efsw/FileWatcherImpl.hpp> | ||
2 | #include <efsw/String.hpp> | ||
3 | #include <efsw/System.hpp> | ||
4 | |||
5 | namespace efsw { | ||
6 | |||
7 | FileWatcherImpl::FileWatcherImpl( FileWatcher* parent ) : | ||
8 | mFileWatcher( parent ), mInitOK( false ), mIsGeneric( false ) { | ||
9 | System::maxFD(); | ||
10 | } | ||
11 | |||
12 | FileWatcherImpl::~FileWatcherImpl() {} | ||
13 | |||
14 | bool FileWatcherImpl::initOK() { | ||
15 | return static_cast<bool>( mInitOK ); | ||
16 | } | ||
17 | |||
18 | bool FileWatcherImpl::linkAllowed( const std::string& curPath, const std::string& link ) { | ||
19 | return ( mFileWatcher->followSymlinks() && mFileWatcher->allowOutOfScopeLinks() ) || | ||
20 | -1 != String::strStartsWith( curPath, link ); | ||
21 | } | ||
22 | |||
23 | } // namespace efsw | ||