|
@@ -24,7 +24,8 @@
|
|
|
#include "File.h"
|
|
#include "File.h"
|
|
|
#include "FileSystem.h"
|
|
#include "FileSystem.h"
|
|
|
#include "FileWatcher.h"
|
|
#include "FileWatcher.h"
|
|
|
-#include "Log.h"
|
|
|
|
|
|
|
+#include "Log.h"
|
|
|
|
|
+#include "Timer.h"
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
#ifdef WIN32
|
|
|
#include <windows.h>
|
|
#include <windows.h>
|
|
@@ -178,7 +179,6 @@ bool FileWatcher::StartWatching(const String& pathName, bool watchSubDirs)
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
#else
|
|
#else
|
|
|
- /// \todo Implement on Unix-like systems
|
|
|
|
|
LOGERROR("FileWatcher not implemented, can not start watching path " + pathName);
|
|
LOGERROR("FileWatcher not implemented, can not start watching path " + pathName);
|
|
|
return false;
|
|
return false;
|
|
|
#endif
|
|
#endif
|
|
@@ -292,7 +292,9 @@ void FileWatcher::ThreadFunction()
|
|
|
}
|
|
}
|
|
|
#elif defined(__APPLE__) && !defined(IOS)
|
|
#elif defined(__APPLE__) && !defined(IOS)
|
|
|
while (shouldRun_)
|
|
while (shouldRun_)
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ Time::Sleep(100);
|
|
|
|
|
+
|
|
|
String changes = ReadFileWatcher(watcher_);
|
|
String changes = ReadFileWatcher(watcher_);
|
|
|
if (!changes.Empty())
|
|
if (!changes.Empty())
|
|
|
{
|
|
{
|