6 """ |
6 """ |
7 Module implementing a QFileSystemWatcher replacement based on the 'watchdog' package. |
7 Module implementing a QFileSystemWatcher replacement based on the 'watchdog' package. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
|
11 import sys |
11 |
12 |
12 from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot |
13 from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot |
13 from watchdog.events import EVENT_TYPE_CLOSED, EVENT_TYPE_OPENED, FileSystemEventHandler |
14 from watchdog.events import EVENT_TYPE_CLOSED, EVENT_TYPE_OPENED, FileSystemEventHandler |
14 |
15 |
15 from eric7.SystemUtilities import OSUtilities |
16 if sys.platform == "darwin": |
16 |
|
17 if OSUtilities.isMacPlatform(): |
|
18 from watchdog.observers.kqueue import KqueueObserver as Observer |
17 from watchdog.observers.kqueue import KqueueObserver as Observer |
19 else: |
18 else: |
20 from watchdog.observers import Observer |
19 from watchdog.observers import Observer |
21 |
20 |
22 |
21 |